FILE: OLE Automation Methods/Properties Supported by OLE App
ID: Q121736
|
The information in this article applies to:
-
Microsoft Visual Basic Learning, Professional, and Enterprise Editions for Windows, version 5.0
-
Microsoft Visual Basic Standard, Professional, and Enterprise Editions, 16-bit and 32-bit, for Windows, version 4.0
-
Microsoft Visual Basic Standard and Professional Editions for Windows, version 3.0
-
Microsoft Word for Windows, version 6.0
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. Click the file name below to download the file:
Ole2v.exe For more information about how to download files from the Microsoft
Download Center, please visit the Download Center at the following Web
address
http://www.microsoft.com/downloads/search.asp
and then click How to use the Microsoft Download Center.
After downloading OLE2V.EXE, run it in an empty directory to extract the
files it contains.
Step-by-Step Instructions
- Make sure the OLE application (Word version 6.0, in this case) has been
installed correctly.
- 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.
- Select the program with which you want to do OLE automation. In this
case, select "WordBasic" near the bottom of the list.
- 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.
- 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.
- 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.
- 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.
- Highlight the text in the "Function Prototype" edit control and copy
it to the clipboard.
- 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
Version : WINDOWS:4.0,5.0,6.0
Platform : WINDOWS
Issue type :
|