Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

To Run a Module every second

Status
Not open for further replies.

eilob

Programmer
Mar 28, 2007
54
IE
Hi I am trying to get in an Access table all the emails that come into the Inbox in Outlook. I have writen a module with some VB code to get the emails on the Access table. What I need to know is how can I set up this module to be runned every second or every couple of seconds all the time. I know I will need to have the access DB open 24 hours, but please if you could clarify the following questions.

If I write an On Timer event those this code goes in the same module?? or in a new one??

Can I save the module as a Macro and then link it to a command button on a Form and set up the times to make it run???

Sorry I am really confused

Thanks

Eilob
 
This sounds like a very bad idea. Why would you need to run it every second? It would take at least a second to run! Why not just gather all emails since your last visit? Are you aware that you can link to Outlook 'tables' from Access?
 
I need to save every single email that comes into a public folder in Outlook before any other member of the team deletes it. They want to know how many emails come into the department. I know I can link outlook to access with a table, but then how do I specify that every time an email comes in be saved.
I thought I write a module and run in every couple of seconds and then emails that come in and are unread will be saved

What do you think should I do???

Thankssss!
 
I think you should use Outlook message rules to create a copy of all incoming mail. I believe that in the 2002 version, there is an option to run your own script (VBA), if you require something more elaborate.

Here is a links that may be useful, I have not tried it:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top