Setting the OLEMenuGroup or OLEUsage values in template

G

Gary

I have a Word 2003 template with a toolbar (Commandbar) and 3 buttons. I have
MSWord set as my default editor in Outlook 2003. When outlook opens and I
create a new email the toolbar and buttons template is merged into the
outlook menu bar.

I did some research and found that either OLEMenuGroup or OLEUsage values
should allow me to prevent the work commandbar.

I created an AutoExec() sub in my template which runs when word starts and
set the buttons oleusage value to server only. This autoexec runs fine when I
open up Word but it does not seem to run when I open up Outlook and create a
new email message.

Is there some way to program this and make it persistant.
This seems like a common problem but I have not been able to find much in
reference on the web.

A code sample would be really appreciated.

Also is there someway when the AutoExec sub runs that I fan detect that word
is opened up embedded in Outlook.

cheers,
Gary
 
P

Perry

I haven't tried it myself but what does following statement return under
Outlook?
Debug.Print ThisDocument.Parent.Name

If this returns "Microsoft Outlook" indeed and not "Microsoft Word" for that
purpose, you've got the distinction
and your code can proceed accordingly.

Krgrds,
Perry
 

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