Group:  Microsoft Word » microsoft.public.word.vba.addins
Thread: How make a toolbar visible only i Word and not in Outlook ?

Geek News

How make a toolbar visible only i Word and not in Outlook ?
"Arild Grimstad" <arildg[ at ]scanmar.no> 3/9/2007 12:07:25 PM
Using a global Word-template as an Add-in, containing a custom toolbar. Word
XP.
When starting Outlook, that toolbar is visible - which is not desirable.

Is there a nice way using VBA to check if Word is opened directly or from
Outlook - and if Outlook do one of these:
- Do not activate AddIn, or
- Accept the AddIn but do not show that Toolbar.

AG/Norway


RE: How make a toolbar visible only i Word and not in Outlook ?
Peter Karlström 3/15/2007 1:41:25 PM
Hi Arild

You can use EnvelopeVisible like this:

If Windows(ActiveDocument).EnvelopeVisible = True Then

True = Opened i Outlook
False = Opened in Word

--
Peter Karlström
Midrange AB
Sweden


"Arild Grimstad" wrote:

[Quoted Text]
> Using a global Word-template as an Add-in, containing a custom toolbar. Word
> XP.
> When starting Outlook, that toolbar is visible - which is not desirable.
>
> Is there a nice way using VBA to check if Word is opened directly or from
> Outlook - and if Outlook do one of these:
> - Do not activate AddIn, or
> - Accept the AddIn but do not show that Toolbar.
>
> AG/Norway
>
>
>

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net