WD: Macro Summary Info Changes Require Open Document

ID: Q98875

The information in this article applies to:

SUMMARY

In Word for Windows you can use Wordbasic commands or properties to change the Properties (Summary Information in Word 1.x-6.x) of the active document. However, the change will take effect only if the document is open.

MORE INFORMATION

The following macro examples demonstrate how to change the Title fields in the Properties or Summary Info dialog box when Test.doc is open. If there are no documents currently open, no error is returned and the information is not changed.

Word for Windows 2.x and Later

   Sub Main
      FileSummaryInfo .Title = "My Title",.FileName = "test.doc"
   End Sub

Word for Windows 1.x

   Sub Main
      EditSummaryInfo .Title="My Title", .FileName="Test.Doc"
   End Sub

If the macros are run while the file is closed, the information will not be changed, and no error message will display. If a complete path is not indicated, the current directory is assumed.

Reference(s):

"Using WordBasic" by WexTech Systems, Inc. and Microsoft Corporation, Microsoft Press, 1992.

Kbcategory: kbusage kbmacro KBSubcategory: Additional query words: 1.0 1.10 1.10a 2.0 2.0a 2.0a-CD 2.0b 7.0 word95 word7 word6 2.0c summary info filesummaryinfo editsummaryinfo winword2 6.0 winword

Keywords          : kbmacro kbmacroexample 
Version           : 2.x 6.0 6.0a 6.0c 7.0 7.0a
Platform          : WINDOWS

Last Reviewed: July 31, 1997