WD: Avoiding Password Prompt Using FileNew Command

Last reviewed: November 17, 1997
Article ID: Q80090
The information in this article applies to:
  • Microsoft Word for Windows versions 2.0, 2.0a, 2.0a-CD, 2.0b, 2.0c, 6.0, 6.0a, 6.0c
  • Word for the Macintosh, versions 6.0, 6.0.1

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 winword2 word6
Version : WINDOWS:2.0,6.0,7.0,97; MACINTOSH:4.0,5.0,5.1,6.0,6.0.1


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: November 17, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.