I have a macro that creates a new document from a template file that
is password protected against modification. When the macro goes to
create a new file using that template, it prompts for a password, or
to click the read only button.

Is there some way I can automatically "click" the read-only button for
the user with my macro? I am using the following method of creating
the new document:

Documents.Add Template:=template_folder & "\" &
Switch.TemplateList.Value, NewTemplate:=False

Any suggestions you have would be most appreciated!!!

Christine.

Re: avoiding password prompt when opening new document from a template by Doug

Doug
Thu Jul 03 19:26:13 CDT 2003

Hi Christine,

Use

SendKeys "%r"
Documents.Add Template:=template_folder & "\" & Switch.TemplateList.Value,
NewTemplate:=False

Please respond to the newsgroups for the benefit of others who may be
interested.

Hope this helps
Doug Robbins - Word MVP
"kaplin" <cmesser@pris.ca> wrote in message
news:a9816568.0307030946.13a02570@posting.google.com...
> I have a macro that creates a new document from a template file that
> is password protected against modification. When the macro goes to
> create a new file using that template, it prompts for a password, or
> to click the read only button.
>
> Is there some way I can automatically "click" the read-only button for
> the user with my macro? I am using the following method of creating
> the new document:
>
> Documents.Add Template:=template_folder & "\" &
> Switch.TemplateList.Value, NewTemplate:=False
>
> Any suggestions you have would be most appreciated!!!
>
> Christine.