WD97: Avoiding Save As Alert When Saving to Different Format

Last reviewed: July 31, 1997
Article ID: Q169937
The information in this article applies to:
  • Microsoft Word 97 for Windows

SUMMARY

When you save a file in a file format other than the default Microsoft Word 97 format , the Office Assistant prompts that you may lose some features.

This article discusses a method you can use to avoid this prompt each time you save a document.

MORE INFORMATION

Microsoft provides examples of Visual Basic for Applications procedures for illustration only, without warranty either expressed or implied, including, but not limited to the implied warranties of merchantability and/or fitness for a particular purpose. The Visual Basic procedures in this article are provided 'as is' and Microsoft does not guarantee that they can be used in all situations. While Microsoft support engineers can help explain the functionality of a particular macro, they will not modify these examples to provide added functionality, nor will they help you construct macros to meet your specific needs. If you have limited programming experience, you may want to consult one of the Microsoft Solution Providers. Solution Providers offer a wide range of fee-based services, including creating custom macros. For more information about Microsoft Solution Providers, call Microsoft Customer Information Service at (800) 426-9400.

To prevent the Office Assistant prompting you each time you save a document in a format other than Word 97, you will need to create three Visual Basic for Applications macros. Name each macro as follows.

   FileSave, FileSaveAs, and Save_SaveAs

then type the following example Visual Basic for Applications code into each respective macro:

   Sub FileSave()
      ' If the document has not been saved
      ' display the File SaveAs dialog.
      If ActiveDocument.Saved = False Then
         Save_SaveAs
      Else
         ' Otherwise, save the document.
         ActiveDocument.Save
      End If
   End Sub

   Sub FileSaveAs()
      Save_SaveAs
   End Sub

   Public Sub Save_SaveAs()
      ' **********************************************
      ' This macro replaces the default functionality
      ' of the FileSaveAs command.
      ' **********************************************
      ' Create Variable.
      Dim myDialog As Dialog
      Set myDialog = Dialogs(wdDialogFileSaveAs)
      'Display the Dialog and save the document.
      If myDialog.Display Then
         ActiveDocument.SaveAs myDialog.Name, myDialog.Format, _
         myDialog.LockAnnot, myDialog.Password, myDialog.AddToMru, _
         myDialog.WritePassword, myDialog.RecommendReadOnly, _
         myDialog.EmbedFonts, myDialog.NativePictureFormat, _
         myDialog.FormsData, myDialog.SaveAsAOCELetter
      End If
   End Sub

For more information about creating macros, click the Office Assistant, type "Create a macro" (without the quotation marks), click Search, and then click to view the "Create a macro" topic.

NOTE: If the Assistant is hidden, click the Office Assistant button on the Standard toolbar. If Microsoft Help is not installed on your computer, please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q120802
   TITLE     : Office: How to Add/Remove a Single Office
               Program or Component


Additional query words: word97 word8 8.0 8.0 vb vbe
Keywords : kbcode kbprg kbtool
Version : 97
Platform : WINDOWS
Issue type : kbhowto


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: July 31, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.