Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming Add-Ins / August 2005

Tip: Looking for answers? Try searching our database.

Catching menu item click event

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jill - 19 Aug 2005 16:36 GMT
I am coding an Outlook addin using Visual Basic and CDO.  In my addin,
I have added several items to the "Tools" menu.  One of these menu
items starts a process that can take several minutes to complete.  A
second menu item becomes enabled only when this process is running, and
this second menu item is used to stop the process started by the first
menu item.

I am able to catch the menu button click event and start the process
with no proplems.  I have added a DoEvents call into the main loop of
my proccess to allow events to be handled while the process is still
running.  I am able to catch serveral types of events while the process
is running.  However, I cannot catch another menu button click event
while the process is still running, i.e. while the first menu button
click is still being handled.

Any ideas why i am unable to catch the second menu button click event?
An ideas how to fix/circumvent this issue?

Thanks!
Ken Slovak - [MVP - Outlook] - 22 Aug 2005 15:04 GMT
Use a timer control to start up your long running process. Set the timer
control to ON when the first click event fires. The timer will fire after
that and start your process, which will allow the first Click event
procedure to complete before the process starts and therefore your second
click will fire.

Signature

Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm

>I am coding an Outlook addin using Visual Basic and CDO.  In my addin,
> I have added several items to the "Tools" menu.  One of these menu
[quoted text clipped - 15 lines]
>
> Thanks!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.