Email Reports via Autoexec Macro [help required]

Joined
Aug 26, 2005
Messages
2
Reaction score
0
i'm trying to email a snapshot of a report via the autoexec macro in access 2000. now let me provide you with a few important points so that you may have an easier time helping me out.

1. i am using the following code in my script:

"C:\Program Files\Microsoft Office\Office\MSACCESS.exe" "C:\Documents and Settings\database.mde"

2. granted that outlook is already running on my computer, the macro executes without flaw. the email is sent once to the required address.

3. when outlook is not open, however, the database prompts for a user profile. i'm assuming this has to do with access 2000 trying to open my default windows mail program (i may be wrong here). anyhow, the prompt screen comes up and the whole purpose of the macro is defeated, since i am to use it via windows task scheduler sometime during night hours.

4. in an attempt to overcome the above problem, i've made windows task scheduler open outlook just prior to executing the macro. this way, outlook is open and there is no prompt for a user profile. the report is emailed.

5. here is the real problem. when i schedule outlook to open at, say, 10:00 AM, and the database to open at 10:01 AM, something goes wrong and the report does not get emailed. during this trial procedure, i am logged out of my computer.

6. i know that windows task schedular actually opened the database because i see an Access.Lock.# file referring to my database file.

so why is it not emailing the report. help would be greatly appreciated. apologies in advance for the long post; i just want to present my problem clearly.
 
Joined
Aug 26, 2005
Messages
2
Reaction score
0
update: the sequence of macros works perfectly (office and then the email macro) when i am logged into my computer, but the macros don't seem to work when i am logged out. i need the macros to work when i am logged out, however, since i will need to send this report before 8:00 AM and will not be logged into my computer at that time.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top