Run Access on recieving email in Outlook

Ciaran_Enright

New member
Local time
Today, 23:53
Joined
Nov 24, 2005
Messages
8
Hi,
One the subject of emails
How can I prompt an access database to run on receiving a mail with a specific subject. ?

Basically IT ftp a file to a network drive and send a mail when the file is updated.

I’ve 2 options
1.Get access to run when the file appears on the network or
2.Run when I receive a mail saying so.

Ps I’m only starting to use VB in modules.

Thanks Ciaran.

:confused:
 
Hi Ciaran,

You can set up a rule in Outlook using the Rules Wizard. One of the action options is Start Application. You could specify your Access file as the one to start. Then put a call in the Autoexec macro to run a specific function, which you can code in VBA to respond appropriately, i.e. process the file. I've not tried this, and it has some limitations, e.g. I can't see how you specify a command-line parameter when you start the application, so it is not as flexible as you might want. You would also need a PC or server running continuously with Outlook open, with this rule set up.

Alternatively, set up a scheduled task on a server that runs every few minutes. The task runs an Access database. Again call a function from the Autoexec macro, and in this function poll (check) for the presence of the file on the network. If its there, process it, otherwise quit the application. This method doesn't require Outlook to be running.

Hope that helps,
Keith.
 
Thanks Keith,
I’ve tried the outlook but the system goes to sleep automatically after 5min, its an admin/IT security, I’ve also tried the scheduled task, but not the Poll function you mentioned.
Can you point me in the right direction regarding the Poll function , In the meanwhile I’ll do a search.
Cheers Ciaran.
 
Hi,

I did not mean to imply there was a specific Poll function! I meant your VBA script should check for the existence of the file.

Cheers,
Keith.
 

Users who are viewing this thread

Back
Top Bottom