Hi all,

If a specific template is active a toolbar must appear. The template has one
little thing: It has a versionnumber. So I am looking for a code something
like:

If Activedocument.attachedtemplated="Proposal" & * then

CommandBars ("test").visible=true

end if

The first line doesn't work. Anyone any idea?

RE: Wildcards and templates by HelmutWeber

HelmutWeber
Mon May 29 02:07:01 CDT 2006

Hi Peter,

If Left(ActiveDocument.AttachedTemplate, 8) = "Proposal"

Note, that is case sensitive.

-
Greetings from Bavaria, Germany
Helmut Weber, MVP WordVBA
"red.sys" & chr(64) & "t-online.de"
Word 2002, Windows 2000

RE: Wildcards and templates by PeterFaulhaber

PeterFaulhaber
Tue May 30 01:17:02 CDT 2006

Helmut,

Thanks a lot. This was very helpful


"Helmut Weber" wrote:

> Hi Peter,
>
> If Left(ActiveDocument.AttachedTemplate, 8) = "Proposal"
>
> Note, that is case sensitive.
>
> -
> Greetings from Bavaria, Germany
> Helmut Weber, MVP WordVBA
> "red.sys" & chr(64) & "t-online.de"
> Word 2002, Windows 2000