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: 924
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: 5,451
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

--------------------
Daniel Pineault (2010-2017 Microsoft MVP)
Professional Help: http://www.cardaconsultants.com
Free MS Access Code, Tips, Tricks and Samples: http://www.devhut.net

* Design should never say "Look at me". It should always say "Look at this". -- David Craib
* A user interface is like a joke, if you have to explain it, it's not that good! -- Martin LeBlanc


All code samples, demonstration databases, links,... are provided 'AS IS' and are to be used at your own risk! Take the necessary steps to check, validate ...
Go to the top of the page
 
ry94080
post Jul 6 2017, 04:09 PM
Post#3



Posts: 924
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: 924
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    14th December 2017 - 10:20 AM