Microsoft KB Archive/122239

{|
 * width="100%"|

HOWTO: Use OLE Automation to Get File Summary from Word 6 Doc

 * }

Q122239

-

The information in this article applies to:


 * Microsoft Visual Basic Standard and Professional Editions for Windows, version 3.0
 * Microsoft Word for Windows, version 6.0

-

SUMMARY
Visual Basic can communicate with Word version 6.0 through OLE Automation. For example, by using OLE Automation, you can access a Word document's file summary information from a Visual Basic application.

NOTE: The CurValues method discussed in the More Information section can be used with any Word dialog box such as ToolsOptionsView, DocumentStatistics,and so on.

MORE INFORMATION
The following steps show you how to create a Visual Basic application that retrieves file summary information from a Word version 6.0 document:


 * 1) Start a new project in Visual Basic. Form1 is created by default.
 * 2) Add a CommandButton (Command1) to Form1.
 * 3) Add the following code to the Command1_Click event of Form1:
 * 4) From the Run menu, choose Start (ALT, R, S) or press the F5 key to run the program.
 * 5) Click the CommandButton to see the document's summary information.

Additional query words:

Keywords : kbinterop kbAutomation kbVBp300 kbWord kbDSupport

Issue type : kbhowto

Technology :