FILE: Help File for VB OLE Automation w/ Word for Windows

ID: Q112733

The information in the article applies to:

SUMMARY

The contents of POSITION.TXT, a file currently being shipped with the Word Development Kit (WDK), is available as a Help file (POSITION.HLP) for use by Visual Basic version 3.0 programmers who want to use OLE Automation to access WordBasic in the versions of Microsoft Word listed at the top of this article.

POSITION.HLP provides a listing of WordBasic functions and all their required parameters in the proper order, which is not the case in Word version 6.x Help file.

In Microsoft Word 97 and later versions, WordBasic has been replaced with Visual Basic for Applications. For backward compatibility, the Microsoft Word Visual Basic for Applications language contains a WordBasic Object. To ensure the correct WordBasic command argument positioning when using OLE Automation, use the POSITION.HLP file for Word for Windows version 6.x.

NOTE: If your program was written to call WordBasic commands and you are anticipating interacting with the Microsoft Word Visual Basic for Applications language for all future development, it is recommended that you convert your code from WordBasic to the Microsoft Word Visual Basic for Applications commands.

The following file is available for download from the Microsoft Software Library:

 ~ position.exe (size: 47167 bytes) 

For more information about downloading files from the Microsoft Software Library, please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q119591
   TITLE     : How to Obtain Microsoft Support Files from
               Online Services

MORE INFORMATION

WordBasic statements or functions in Microsoft Word can take named arguments. But Visual Basic version 3.0 does not support named arguments so when a Visual Basic version 3.0 application sends WordBasic commands through OLE Automation, Visual Basic must specify all the parameters to a WordBasic function in the proper order. The same call in WordBasic may only require some of the parameters using named arguments, and those parameters could be provided in any order.

For most WordBasic statements, the positioning of the arguments is documented in the WordBasic Help topics or printed reference entries for those statements. However, the arguments for some statements are not listed in proper order, or the arguments are irrelevant or have no effect. These arguments are not documented in WordBasic Help or in the printed reference.

For example, the InsertIndex statement corresponds to the Index tab in the Index and Tables dialog box. The InsertIndex statement takes a number of arguments that have to do with other tabs in the dialog box, such as the Table of Contents tab. Because these arguments are irrelevant to inserting an index, they are ignored and therefore not documented in WordBasic Help or in the printed reference. But you, as a Visual Basic version 3.0 OLE Automation programmer, need to be aware of these arguments so you can correctly specify arguments by position.

Keywords          : kbprg IAPOLE vbwin 
Version           : WINDOWS:3.00
Platform          : WINDOWS

Last Reviewed: September 30, 1997