Microsoft KB Archive/98875

{|
 * width="100%"|

WD: Macro Summary Info Changes Require Open Document

 * }

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, 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 = &quot;My Title&quot;,.FileName = &quot;test.doc&quot; End Sub

Word for Windows 1.x
  Sub Main EditSummaryInfo .Title=&quot;My Title&quot;, .FileName=&quot;Test.Doc&quot; 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):

&quot;Using WordBasic&quot; 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

Issue type :

Technology :