FILE: OLE Automation Methods/Properties Supported by OLE App

Q121736


The information in this article applies to:


SUMMARY

There are a number of application products that support OLE Automation. This article explains how to find the function names and syntax to call these OLE functions from Visual Basic by using OLE Automation.


MORE INFORMATION

This article uses Microsoft Word version 6.0 as an example OLE application. However, you can also get the OLE functions from the Microsoft Word version 6.0 Developers Kit. The Developers Kit also provides a complete reference for all the parameters.

You will need to obtain OLE2VIEW.EXE. OLE2VIEW.EXE is located on the Microsoft Visual C/C++ version 1.5 Development Kit, the Microsoft Visual Basic 4.0 CD-ROM and the Microsoft Visual Basic 5.0 CD-ROM. You may also obtain OLE2VIEW by downloading OLE2V.EXE from the Microsoft Software Library.

NOTE: In order to run OLE2VIEW.EXE, you must have OLE2 installed on your system. OLE2 is installed when you install any OLE2 enabled application, for example, Microsoft Visual Basic 3.0 or any of the Microsoft Office applications (Microsoft Word 6.0, Microsoft Excel 5.0, Microsoft Access 2.0, and so forth).

The following file is available for download from the Microsoft Download Center:

Ole2v.exe
For additional information about how to download Microsoft Support files, click the article number below to view the article in the Microsoft Knowledge Base:
Q119591 How to Obtain Microsoft Support Files from Online Services
Microsoft used the most current virus detection software available on the date of posting to scan this file for viruses. Once posted, the file is housed on secure servers that prevent any unauthorized changes to the file.



After downloading OLE2V.EXE, run it in an empty directory to extract the files it contains.

Step-by-Step Instructions

  1. Make sure the OLE application (Word version 6.0, in this case) has been installed correctly.


  2. Start the OLE2VIEW.EXE application. Wait a few seconds while it gathers all the OLE information and places it in the list box on the left side of the display.


  3. Select the program with which you want to do OLE automation. In this case, select "WordBasic" near the bottom of the list.


  4. Double-click "WordBasic" to list the interfaces in the list box on the right side of the display. You should see "IDispatch, ITypeInfo and IUnknown" listed.


  5. Double-click IDispatch. You should see a dialog box. Again, you need to wait a few seconds while the Functions list box on the left is filled in. The Functions list box will display all the functions WordBasic supports via OLE Automation.


  6. Select the function you want; in this case, select FileOpen. You can click in the Functions list box to establish the focus, and then press the F key to get to the functions that begin with the letter F.


  7. Click the function you want. You will see the parameters for that function displayed in the "Function Prototype" read-only edit control and a short description of the function displayed in the bottom-left list box.


  8. Highlight the text in the "Function Prototype" edit control and copy it to the clipboard.


  9. Paste the function into your Visual Basic application.



REFERENCES

For additional information, please see the following article in the Microsoft Knowledge Base:

Q122244 SAMPLE: Ole2View 1.33 Update Available in Download Center

Additional query words:

Keywords : kbfile kbinterop kbAutomation kbVBp300 kbVBp400 kbVBp500 kbWord kbGrpDSO kbNoUpdate
Issue type :
Technology : kbWordSearch kbVBSearch kbAudDeveloper kbZNotKeyword6 kbZNotKeyword2 kbVB500Search kbVBA500 kbVB500 kbVB400Search kbVB300Search kbVB400 kbVB300 kbVB16bitSearch kbWord600


Last Reviewed: June 26, 2001
© 2001 Microsoft Corporation. All rights reserved. Terms of Use.