Using Windows Calls to Create Dialog Boxes in Word for WindowsLast reviewed: July 30, 1997Article ID: Q80931 |
The information in this article applies to:
SUMMARYIn Microsoft Word for Windows macros, you can use Microsoft Windows calls to create dialog boxes.
MORE INFORMATIONThe following is a sample Word for Windows macro that uses Windows calls to display a sample dialog box:
Word 7.0
Declare Function GetFocus Lib "user32" Alias "GetFocus"() As Long Declare Function MessageBox Lib "user32" Alias "MessageBoxA"(hWndParent \As Long, lpText As String, lpCaption As String, wType As Long) As Long
Sub MAINhWndParent = GetFocus lpText$ = "Example Text" lpCaption$ = "Example Caption" wType = 0 result = MessageBox(hWndParent, lpText$, lpCaption$, wType) End Sub Word 6.0, 2.0
Declare Function GetFocus Lib "user"() As Integer Declare Function MessageBox Lib "user"(hWndParent As Integer, lpText$, \lpCaption$, wType As Integer) As Integer Sub MAINhWndParent = GetFocus lpText$ = "Example Text" lpCaption$ = "Example Caption" wType = 0 result = MessageBox(hWndParent, lpText$, lpCaption$, wType) End SubFor more information on creating dialog boxes using the WordBasic macro language, query on the following in the Microsoft Knowledge Base:
dialog and box and macro and editor REFERENCES"Microsoft Word for Windows and OS/2 Technical Reference" pages 149, 437-438 "Using WordBasic," by WexTech Systems and Microsoft, pages 173, 363-366 Kbcategory: kbusage kbmacro KBSubcategory: |
Additional query words: winword2 6.0 6.0a 6.0c winword 7.0 word95
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |