CommandBarButton & MS Word as Message Editor

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

Does anybody know Is it possible to add custom CommandBarButton to Standard
toolbar or create custom toolbar when MS Word is used as Message Editor?
I guess the answer is No but I can not find what the documentation says
about it.
Can anyone help me?
 
Your question actually has two answers. In Outlook 2000 it's not possible or
practical to add CommandBarButtons to the Standard toolbar on a Word
Inspector because Outlook doesn't raise a NewInspector event if the Word is
being used as the editor.

You can access Word Inspector toolbars in Outlook 2002 or 2003, but there's
an extra wrinkle. Word treats a change to the toolbar (such as adding or
removing a CommandBarButton) as a change to the underlying template. The
result is that the user gets prompted to save changes to the template when
the Word Inspector closes. You can eliminate that prompt by clearing the
dirty flag on the template programmatically by setting
Document.AttachedTemplate.Saved = True for the Word document. For Outlook
2002 pre-SP 3 you can use Inspector.WordEditor.Application to access the
underlying Word automation server. But unless your application is trusted it
will raise a security prompt if you try to access the WordEditor in Outlook
2002 SP 3 or above or Outlook 2003. To get around that you can use GetObject
to access the running Word instance. The user may have more than one Word
document open, so you will need to loop through Word's Documents collection
to find the one that corresponds to your Outlook Inspector. I hope that helps
 
Back
Top