Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

knowing when Word is in use as Outlook's email editor

Posted on 2004-03-22
9
240 Views
Last Modified: 2010-05-01
Hi,

I'm writing a Word add-in that needs to know when the active document is actually an Outlook email being edited. Any suggestions on how to detect that the current document is actually an email?
0
Comment
Question by:thePrisoner
  • 3
  • 2
  • 2
  • +2
9 Comments
 
LVL 19

Expert Comment

by:BrianGEFF719
ID: 10654667
check to see if the document contains HTML, more than likely it will be Outlook.


-Brian
0
 
LVL 19

Expert Comment

by:BrianGEFF719
ID: 10654669
Application.Name ?


-brian
0
 
LVL 1

Expert Comment

by:mADOchist
ID: 10654879
??? need more info ??? Do you use word as an e-mail editor or simply outlook??? Do you wish to do this only for e-mail attachements ???
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 

Author Comment

by:thePrisoner
ID: 10655068
Word is set as the email editor for Outlook, so i get the Word toolbars -- including my addin. I don't want that, I want to my addin to hide the toolbar and go inactive if it residing in Outlook.
0
 
LVL 1

Expert Comment

by:Krelek200
ID: 10662036
Are you say that you do not want the toolbars to show?
0
 

Author Comment

by:thePrisoner
ID: 10662364
I know how to make or unmake the my toolbar visible, but I need a way to detect if that particular instance of Word is being used by Outlook
0
 
LVL 1

Expert Comment

by:Krelek200
ID: 10662472
Usely it can be found in the options mail format properties.  It is a check box under it and so should be a True False or 0 1 setup...

I think the property is called UseWordMail....

If you force that property to false, it will take away Word as the email editor for Outlook
0
 

Author Comment

by:thePrisoner
ID: 10673488
The problem with the answer Krelek200 is that I don't know of a way to tell if the word document is being opened in Word or a new email is being created in Outlook. application.name returns "Microsoft Word" in both cases, as does activedocument.parent

My goal here is to not show my addin-s toolbar if the document is actually an email. And -regardless of what the MS documentation says - application.mailmessage exists in just a doc created in word,

The key is finding a way for the addin to distinguish wether the activedocument is an email in outlook or a doc in word.
0
 

Accepted Solution

by:
HammerHaim earned 401 total points
ID: 11058272
Hi

The Kind property on the Word.Document class is wdDocumentEmail (2) when the current document is an eMail.

If you want to trap the creation of the document I think you have to do so from the creating application, i.e. Outlook. If you create an addin for Outlook you can trap the creation of a new Inspector object and call its IsWordMail method, which will return True if Word is used as editor. You should then be able to remove any offending toolbars etc.

Hope it helps
Jacob Hammer
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

837 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question