[AccessD] Scheduling a macro to run

Long, Karen S. (CDC/NIOSH/NPPTL) (CTR) cyx5 at cdc.gov
Wed Apr 26 06:18:38 CDT 2006


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




More information about the AccessD mailing list