The information in this article applies to:
SUMMARYIn Microsoft Word for Windows, you can access the information in the Summary Info dialog box using the Microsoft WordBasic macro language and then post the information in a message box or insert the information into the active document. MORE INFORMATIONTo obtain the value of any field in the Summary Info dialog box, use the GetCurValues statement to access the information, then assign a string variable (A$) to the value of the field desired. The following macro displays the number of words, characters, and pages in the active document: Word 7.x, 6.x and 2.x
If you are using Word version 1.x for Windows, change the two
occurrences of FileSummaryInfo to EditSummaryInfo. The .Update
argument for the FileSummaryInfo command updates the summary
information so that the number of words, number of characters, and
number of pages are most accurate.
Additionally, you can use a similar macro to insert the contents of fields within the Summary Info dialog box at the insertion position in the document. The following macro inserts the Title, Subject, and Author text as it appears in the Summary Info dialog box: Word for Windows 6.0 and 2.0
Word version 6.0 for Windows includes the following new parameters
for the FileSummaryInfo statement:
.FileSizeIf you are using Word version 1.x for Windows, change the two occurrences of FileSummaryInfo to EditSummaryInfo. Note: "Using WordBasic" for Word version 2.x for Windows and the online documentation incorrectly list the following arguments as numbers instead of text variables: .NumPagesNote: Microsoft provides macros "as is" without warranty of any kind, either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose. For information about how to do this in Word 97, please see the following article(s) in the Microsoft Knowledge Base: Q158768 Sample VB Code to Set, Retrieve Summary Information REFERENCES
"Using WordBasic," by WexTech Systems and Microsoft, page 209
Additional query words: winword2 1.0 1.1 1.1a 1.10 1.10a 2.0 7.0 word95 word7 word6 winword msgbox author title subject insert macword 6.0.1
Keywords : |
Last Reviewed: December 22, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |