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 / September 2007

Tip: Looking for answers? Try searching our database.

Customize Toolbar Appear Multiple Times

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
pjerling - 28 Sep 2007 15:13 GMT
Hi there,

I have created a new toolbar in Outlook 2003 using C#. Everytime I open a
message, the toolbar appears again. Thus if I have 1 email open i'll see the
toolbar. If I open another email, I'll see two toolbars, etc...

How do I check to see whether the toolbar already exists and if it does
exists do not create it again.

Thanks.
PJ
Ken Slovak - [MVP - Outlook] - 28 Sep 2007 15:47 GMT
Your best approach is to use an Inspector wrapper class so you can handle
click events individually for each open Inspector in case there's more than
one Inspector open. See Helmut Obertanner's C# Inspector wrapper at
www.outlookcode.com  for that.

Key points for the wrapper or other handling like that:

1. Use a unique Tag property for every toolbar you create so multiple open
items don't each get every Click event.

2. Create your UI using the Temporary argument and set it true so the UI is
automatically disposed of.

3. Delete the UI when the item is closed as a safety precaution and best
practice.

Signature

Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm

> Hi there,
>
[quoted text clipped - 8 lines]
> Thanks.
> PJ
pjerling - 28 Sep 2007 16:34 GMT
Brilliant thanks Ken!

> Your best approach is to use an Inspector wrapper class so you can handle
> click events individually for each open Inspector in case there's more than
[quoted text clipped - 24 lines]
> > Thanks.
> > PJ
 
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.