UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Automating The Emailing Of A Report, Access 2010    
 
   
baffled100
post Oct 4 2017, 06:02 PM
Post#1



Posts: 343
Joined: 10-December 12



Hi,

What is the easiest/best way to automate the emailing of a report? I have a command button on a form that runs VBA code that will email an exported report in PDF format and it works perfectly. I'd like to be able to schedule this process to run after hours. I've done this with batch files that start an Access macro, and I schedule the batch file to run at a certain time, but I've never done it with VBA code. I don't believe I can email the report using a macro because I need to have the current date in the subject line (maybe that is possible??), so I am using a command button/event procedure to make it work. But I don't know how to get the VBA code to run from outside of Access.

Thank you!
Go to the top of the page
 
GroverParkGeorge
post Oct 4 2017, 06:54 PM
Post#2


UA Admin
Posts: 31,195
Joined: 20-June 02
From: Newcastle, WA


You can call VBA from a macro, so if that would work, and if you already have VBA that gets the date, then you could use a macro to run it. You can use Windows Scheduler to open the accdb and run the macro,

--------------------
Go to the top of the page
 
baffled100
post Oct 5 2017, 08:00 PM
Post#3



Posts: 343
Joined: 10-December 12



Thanks for your reply.......I guess my question wasn't clear......how do you call VBA from a macro?
Go to the top of the page
 
baffled100
post Oct 6 2017, 10:10 AM
Post#4



Posts: 343
Joined: 10-December 12



I've got it figured out using a function.... smile.gif
Go to the top of the page
 
GroverParkGeorge
post Oct 6 2017, 10:11 AM
Post#5


UA Admin
Posts: 31,195
Joined: 20-June 02
From: Newcastle, WA


Congratulations on resolving the problem.

Continued success with your project.

--------------------
Go to the top of the page
 


Custom Search
RSSSearch   Top   Lo-Fi    12th December 2017 - 03:07 AM