Outlook + Word as Editor Addin Sample

J

Jim Adams

Looking for a VB6 sample that will add a toolbar button on the new
message window using Outlook as the editor and also Word as the
editor.

Just popping up a message box when either button is pressed would be
sufficient.

Thanks for any links that you can offer.

-Jim
 
K

Ken Slovak - [MVP - Outlook]

Outlook version? You can't do it at all with Outlook 2000 or earlier. With
Outlook 2002 or 2003 you can handle the NewInspector event and add a
CommandBarButton just as you would with the Outlook editor. The only
difference would be that the Normal.dot template will be marked as dirty and
the button will be saved unless explicitly deleted from Word. Word has no
concept of temporary buttons.

Other than that the procedures are identical.

In NewInspector:

Dim oCB As Office.CommandBar
Dim oCBB As Office.CommandBarButton

Set oCB = Inspector.CommandBars("Menu Bar")
Set oCBB = oCB.Controls.Add(Type:=msoControlButton, Temporary:=True)
etc.

The click event should then fire in either Word or the Outlook editor.

See www.outlookcode.com for more information on creating buttons.
 

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