kedar_vj

Hi,
I have created word addin. But whenever i use outlook to write email the word addin get called
So i'd like to check while loading word addin if the present word document is being used for email writing or not
how to check the word object is being used for writing email
is there any method in word object to check like isWordasEmailEditor



Re: Visual Studio Tools for Office how to detect if word is being used as word mail?

Sue Mosher - Outlook MVP

Take a look at the Document.Kind property, which will have a value of wdDocumentEmail (=2) if it's an email message.



Re: Visual Studio Tools for Office how to detect if word is being used as word mail?

kedar_vj

Perfact ! but i cant use this while addin buttons to word object.
As i am adding buttons to word object in OnStartupComplete, at this time the activeDocument is nothing.
hence the button still displayed in outlook-mail-compose when we use WORD as Email Editor.
well I have disabled word's button click but there isn't any way to just not displaying it.
I have thought of an idea of deleting button from Commandbar's object.
But this will again reflects in Normal.dot.





Re: Visual Studio Tools for Office how to detect if word is being used as word mail?

J_J

Kedar, have you solved this problem yet I am having the same issue you have, I need to hide the add-in if word is used as word mail. If you found a soluction already, please kindly let me know.

Thanks.

Joyce





Re: Visual Studio Tools for Office how to detect if word is being used as word mail?

kedar_vj

Sue is correct ! what is ur problem