outlook toolbar created everytime i open outlook

A

Anushya

Hi
I am creating a outlook addins and in that OnConnection i am creating
a toolbar(Commandbars). the code is working fine..

But the problem is whenever i restart outlook, it is creating a new
toolbar..

Wot is the change i need to do??

Pls let me know immediately
Anushya
 
F

Falconetti Daniel

Hi,

you should parse the toolbar collection to see if your toolbar is allready
there. If so don't create it again.
ActiveExplorer.CommandBars.Item("MyCmdBar")
 
D

Dmitry Streblechenko

Either check if your toolbar is already there and delete it or (even better)
create your toolbar as temporary (CommandBars.Add(...Temporary:=true, ...)),
this way Outlook will not persist it between the sessions.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
T

Tom Carter

Hi v_anushya,

Try modifying your code to get the existing Outlook object to check
for the Commandbar that you have already created. Bypass the creation
process if the Commandbar already exists .

~~~~~~~~~~~~~
Tommie Carter
 
A

Anushya

Thanks Dmitry
It works fine.
Anushya
Dmitry Streblechenko said:
Either check if your toolbar is already there and delete it or (even better)
create your toolbar as temporary (CommandBars.Add(...Temporary:=true, ...)),
this way Outlook will not persist it between the sessions.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top