[AccessD] Scheduling a macro to run

Max Home max at sherman.org.uk
Wed Apr 26 10:19:58 CDT 2006


Hi All,

I am using Office3k.

I can set up a scheduled event
(Start/All Programs/Accessories/System Tools/Scheduled Tasks)

I can set it to open Outlook or Access or anything at the set dates/times,
etc.

When I open Access with the Scheduler it runs the Autoexec macro just fine
and in there I can tell it what to do.

When I try to do the same in Outlook it fails to run the
Application_Startup() function.

The following applies:
1. Macro security is set to low.
2. There is nothing disabled in "Help About Microsoft Office/Disabled Items"
3. The function works fine if manually invoked (Run button or F5).
4. It just won't run when the application loads (even using the exact
example from Outlook help)

Any ideas?  I suppose I could create an Outlook object and see if that
works, but I would like to run Outlook directly from the Scheduler in the
same way that I can run Access.

Regards

Max


-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Long, Karen S.
(CDC/NIOSH/NPPTL) (CTR)
Sent: 26 April 2006 12:19
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Scheduling a macro to run

You can do it by creating a DTS ActiveX script from SQL server.  Then
schedule the task from SQL server.  You have to use VB, not VBA.

Function PrintReport()
 Dim objDB
 Set objDB = CreateObject("Access.Application")
 objDB.OpenCurrentDatabase("C:\Program Files\Microsoft
Office\Office10\Samples\Northwind.mdb")
 objDB.DoCmd.OpenReport "prtOpenedProjects", 0
 objDB.CloseCurrentDatabase
 objDB.Quit
 PrintReport = DTSTaskExecResult_Success
End Function 


Karen S. Long
Programmer Analyst
EG&G Technical Services, Inc.
Pittsburgh, PA
Phone: 412-386-6649
Email: cyx5 at cdc.gov


-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Dian
Sent: Tuesday, April 25, 2006 9:19 PM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] Scheduling a macro to run

John, don't give it up just yet...I did this for a company a few years
ago...know the info is here somewhere, just haven't found it yet...will
do it as fast as I can...

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of John Colby
Sent: Sunday, April 23, 2006 6:28 AM
To: 'Access Developers discussion and problem solving'
Subject: [AccessD] Scheduling a macro to run

Does anyone know how to schedule an Outlook macro to run every day (to
send a canned email)?

John W. Colby
www.ColbyConsulting.com 


--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list