avoiding password prompt when opening new document from a template

K

kaplin

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.
 
D

Doug Robbins - Word MVP

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
 

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