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
> Outlook VBA Events, Office 2013    
 
   
ry94080
post Jul 6 2017, 12:53 PM
Post#1



Posts: 968
Joined: 27-July 05



Hi all,

I have some code that fires off on the Application_Startup event to check my emails to see if I received a certain email. It seems to work fine.

However, when I open up Outlook, it seems to be reading my email before new emails have been downloaded to my mailbox.

Is there a different event I can use the fire off after startup and the new emails have downloaded? I have tried the Application_MAPILogonComplete event and it also fired off too soon.

Thanks
Go to the top of the page
 
DanielPineault
post Jul 6 2017, 01:23 PM
Post#2


UtterAccess VIP
Posts: 6,122
Joined: 30-June 11



Take a look at: https://msdn.microsoft.com/en-us/library/ms...#code-snippet-1 it should have everything you need.

Another great article on the subject is: http://www.outlookcode.com/article.aspx?id=62
Go to the top of the page
 
ry94080
post Jul 6 2017, 04:09 PM
Post#3



Posts: 968
Joined: 27-July 05



Thanks DanielPineault.

I did some research and found I can use the mySync_SyncEnd event, which seems to work.

However it fires off everytime a sync is completed. Is there a way I can setup a Boolean value to be kept so that it can remember that it ran one time and not run again?
Go to the top of the page
 
ry94080
post Jul 6 2017, 04:32 PM
Post#4



Posts: 968
Joined: 27-July 05



Ah - I think I can do that with a global variable?
Go to the top of the page
 


Custom Search
RSSSearch   Top   Lo-Fi    18th October 2018 - 09:51 AM