WD: Avoiding Password Prompt Using FileNew Command

ID: Q80090

The information in this article applies to:

SUMMARY

In a Microsoft Word macro, if you use the FileNew command to create a new document or template based on a password-protected template, you receive a prompt for the template's password. The only way to avoid receiving this prompt is to have the specified template already open.

MORE INFORMATION

In Word macros, the FileOpen command may use a PASSWORDDOC and/or a PASSWORDDOT field to provide the password for the given document and/or the template that it is based on. The FileNew command does not have either of these fields; therefore, when you create a new document or template based on a specific template, you cannot specify a password inside the macro to avoid the password prompt.

For additional information, please see the following article(s) in the Microsoft Knowledge Base:

   ARTICLE-ID: Q79644
   TITLE     : WinWord: Assigning Passwords to Template Files

Kbcategory: kbusage kbmacro KBSubcategory: kbtemplate

Additional query words: 2.0 2.0a 2.0a-CD 2.0b 2.0c winword2 6.0.1 winword 6.0c word6 winword wordbasic statement protection macword

Keywords          : winword word6 winword2 
Version           : WINDOWS:2.0,6.0,7.0,97; MACINTOSH:4.0,5.0,5.1,6.0,6.0.1

Last Reviewed: November 18, 1997