home *** CD-ROM | disk | FTP | other *** search
- %REM
- This template demonstrates creating a User Bar. You will need to use the Lotus Dialog Editor to create
- the Dialog Box. With your cursor in the main document, select Edit/ Scripts & Macros/ New Custom Dialog.
- Paste your Custom Dialog Box into the new section and change the Section tab to the name you will use
- to reference the dialog. Then modify the code below as needed for your application.
- %ENDREM
-
- 'Place this line in the Declarations section of your script
- Dim ThisDialog As LWPCustomDialog
-
- 'These lines wil Link your variable to the description and define it as a Word Pro User Bar
- Set ThisDialog = Bind("!NameOfDialog")
-
- ThisDialog.Modal = False
- ThisDialog.BarType = 1 ' 2 application, 1 Document
-
- ThisDialog.BarSide = 2 '1 Left , 2 Top, 4 Right, 8 Bottom
-
- 'If you have any values that need to be inserted into the dialog prior to displaying, use the following
- 'Methods:
- ' AddListBoxText( Control_ID, Text )
- ' SetControlText( Control_ID, Text )
- ' SetControlValue( Control_ID, Value )
- 'This line fills and edit box with some dafault text
- ThisDialog.SetControlText 8000, "Type Company Name Here"
- 'This line sets a radio button to selected
- ThisDialog.SetControlValue 20, True
-
- 'Use the "On Event" command to set up a subroutine that will perform the necessary functions
- On Event DialogEvent From ThisDialog Call MyDialogEvent
-
- ThisDialog.Show(0)
-
-
- Sub MyDialogEvent(Source as LWPCustomDialog, Controlid as Integer, Why as Integer)
- If (Controlid = 0) And (Why = 7007) Then
- Messagebox ThisDialog.GetControlText( 8000 )
- End If
- End Sub
-