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    
post Jul 6 2017, 12:53 PM

Posts: 937
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.

Go to the top of the page
post Jul 6 2017, 01:23 PM

UtterAccess VIP
Posts: 5,768
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 ...(you are responsible for your choices and actions)
Go to the top of the page
post Jul 6 2017, 04:09 PM

Posts: 937
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
post Jul 6 2017, 04:32 PM

Posts: 937
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    22nd March 2018 - 06:25 PM