WD97: Avoiding Save As Alert When Saving to Different FormatLast reviewed: July 31, 1997Article ID: Q169937 |
The information in this article applies to:
SUMMARYWhen 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 INFORMATIONMicrosoft 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_SaveAsthen 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 SubFor 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
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |