WD: Macro Summary Info Changes Require Open Document

ID: Q98875


The information in this article applies to:
  • Microsoft Word for Windows, versions 1.0, 1.1, 1.1a, 2.0, 2.0a, 2.0a-CD, 2.0b, 2.0c, 6.0, 6.0a, 6.0c
  • Microsoft Word for Windows 95, versions 7.0, 7.0a


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.

Additional query words: 1.0 1.10a 2.0 7.0 word95 word7 word6 summary info filesummaryinfo editsummaryinfo winword2 6.0 winword

Keywords : kbmacro kbmacroexample
Version : WINDOWS:1.0,1.1,1.1a,2.0,2.0a,2.0a-CD,2.0b,2.0c,6.0,6.0a,6.0c,7.0,7.0a
Platform : WINDOWS
Issue type :


Last Reviewed: October 4, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.