The macro that I want to run has nothing to do with Outlook, but I thought that Outlook might be a good way to force this macro to run repeatedly on a schedule all day long.
Outlook is set to check the server for new mail every three minutes, so this macro would run every three minutes whether new mail was detected or not.
Have a look here for how to schedule a macro repeatedly after a set time:
http://www.cpearson.com/excel/OnTime.aspx
Dom
"May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."
Use code tags when posting your VBA code: [code] Your code here [/code]
Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.
That works in Excel. The Outlook "Application" does not support the "ontime" )object. At least not in my Outlook (2007).
"May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."
Use code tags when posting your VBA code: [code] Your code here [/code]
Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.
The event you are looking for is this one here http://msdn.microsoft.com/en-us/libr...ice.11%29.aspx
This is going to fire in Outlook for you.
If you are using this from Excel you will need to get the outlook object and then use WITHEVENTS so that this event will fire in your excel.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks