WD: Undocumented WordBasic Dialog BoxesLast reviewed: February 2, 1998Article ID: Q114849 |
The information in this article applies to:
SUMMARYThis article describes three undocumented Word dialog boxes you can open using the Connect, NewToolbar, and WindowList WordBasic statements. All three of these dialogs are available in Word for Windows, however the Connect dialog is not available in Word for the Macintosh. The article contains three sample macros that you can use to open these dialog boxes. NOTE: The Connect, NewToolbar, and WindowList statements ARE documented; only their associated dialog boxes are undocumented.
WordBasic Statement Dialog Box ------------------- ---------- Connect Connect To Network Drive NewToolbar New Toolbar WindowList ActivateMicrosoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific needs. If you have limited programming experience, you may want to contact the Microsoft fee-based consulting line at (800) 936-5200. For more information about the support options available from Microsoft, please see the following page on the World Wide Web:
http://www.microsoft.com/support/supportnet/refguide/default.asp MORE INFORMATION
Connect Statement: Connect To Network Drive Dialog BoxYou can use the Connect statement in a macro to open the Connect To Network Drive dialog box. In this dialog box, you can select a logical drive letter and type the network path and any password. When you choose OK, Word establishes the network connection. NOTE: If you choose the Help button in the Connect To Network Drive dialog box, a "Help topic does not exist" error message appears. The following sample NetConnect macro opens the Connect To Network Drive dialog box:
Sub MAIN Dim dlg As Connect GetCurValues dlg If Dialog(dlg) Then Connect dlg End SubThe following modified NetConnect macro inserts the network name in the Connect To Network Drive dialog box for you. You only need to select a letter from the Drive list and choose OK.
Sub MAIN Dim dlg As Connect GetCurValues dlg dlg.Path = "\\project\info" If Dialog(dlg) Then Connect dlg End Sub WindowList Statement: Activate Dialog BoxYou can use the WindowList statement in a macro to open the Activate dialog box. The Activate dialog box contains a list of all the currently open documents. You can select a document and choose OK to activate that document. NOTE: If you choose the Help button in the Activate dialog box, Word incorrectly displays the "1, 2, 3... Command (Window menu)" online Help topic. The following sample WindowActivate macro opens the Activate dialog box. In the Activate list, your current document is selected by default. (This is handy if you are in Full Screen view and want to know the name of your current document.)
Sub MAIN On Error Resume Next ToolsMacro .Name = "WindowList", .Show = 2, .Run End Sub NewToolbar Statement: New Toolbar Dialog BoxYou can use the NewToolbar statement in a macro to open the New Toolbar dialog box, where you can type the name of a new toolbar and select the template in which you want to store it. The advantage of using the NewToolbar statement is that you do not have to first open the View Toolbars dialog box and then choose the New button. The following sample MakeNewToolbar macro opens the New Toolbar dialog box:
Sub MAIN Dim dlg As NewToolbar GetCurValues dlg If Dialog(dlg) Then NewToolbar dlg End SubNOTE: If you choose the Help button in the New Toolbar dialog box, Word correctly displays the New Toolbar Dialog Box online Help topic.
REFERENCES"Microsoft Word Developer's Kit," Microsoft Press, 1994, pages 301, 601, 814
|
Additional query words: word basic
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |