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

ID: Q112733


The information in this article applies to:
  • Microsoft Visual Basic Standard and Professional Editions for Windows, version 3.0
  • Microsoft Word for Windows, versions 6.0a, 6.0c
  • Microsoft Word for Windows NT, version 6.0
  • Microsoft Word for Windows 95, versions 7.0, 7.0a
  • Microsoft Word 97 for Windows


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 Download Center. Click the file name below to download the file:

Position.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.


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.

Additional query words:

Keywords : kbprg IAPOLE vbwin
Version : WINDOWS:3.0,6.0a,6.0c,7.0,7.0a,97; winnt:6.0
Platform : WINDOWS winnt
Issue type :


Last Reviewed: December 13, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.