outlook Wordeditor

S

Shinya

I want to know how to uncheck the com-addin for ms word by program?
I want to do is uncheck if the word is launched from outlook
as wordeditor otherwise always check.


Shinya
 
F

Fredrik Wahlgren

Hi

I guess this can be accomplished by writing a new add-in that checks how
Word was started. The ConnectMode parameter that you get from the
OnConnection event will give you this piece of information. Depending on its
value, you can activate/deactivate the other addin. However, as far as I
know, there's no easy way to tell what application launched word. It could
be Outlook or any other application, like IE or similar. This idea is not
enough if the unload necessarily has to be by program. Here's a list of the
values that ConnectMode may have

ext_cm_AfterStartup 0 Add-in was loaded after the application started,
or by setting the Connect property of the corresponding AddIn object to
True.
ext_cm_Startup 1 Add-in was loaded at startup.
ext_cm_External 2 Add-in was loaded externally by another program or
component.
ext_cm_CommandLine 3 Add-in was loaded through the Visual Studio
devenv command line.
ext_cm_Solution 4 The Add-in was loaded when a user loaded a solution
that required the Add-in.
ext_cm_UISetup 5 The Add-in was started for the first time since being
installed.


/ Fredrik
 
S

Shinya

How about get word object outlook.application.Inspector.WordEditor in
IDTExtensibility2_OnStartupComplete
Remove the toolbar. This way seems a lot easy but
I have problem getting word object from otlkdoc.inspector.wordeditor

shinya
 
F

Fredrik Wahlgren

Are you trying to remove a ms word com-addin from outlook? My idea was for
this addin to go into word.
 
S

Shinya

Fredrik,
ext_cm_Startup 1 Add-in was loaded at startup.
ext_cm_External 2 Add-in was loaded externally by another program or component.
ext_cm_CommandLine 3 Add-in was loaded through the Visual Studio devenv command line.
ext_cm_Solution 4 The Add-in was loaded when a user loaded a solution that required the Add-in.
ext_cm_UISetup 5 The Add-in was started for the first time since being
installed.
Thanks for the input.
I tried to check the connect mode, but word addin gives me 1(ext_cm_Startup)
even started at IDTExtensibility2_ONConnection when it is startred from
outlook.
I am still searching for this solution.


Shinya
 
F

Fredrik Wahlgren

Hi

Well the idea was just to be able to see whether the program had been
started normally or by Automation. Check the IDTExtensibility2
documentation, maybe its some other parameter that needs to be acted on.
 
S

Shinya

Outlook.Inspectors has an event called new inspector,
and at this event I can hide word addin toolbar
(ByVal Inspector As Outlook.Inspector) just like the following
it looks ok now.

Private Sub otlkInspec_NewInspector(ByVal Inspector As Outlook.Inspector)
Inspector.WordEditor.CommandBars(IIMSTOOLBAR_NAME).Visible = False
End Sub

Shinya
 

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