The following code example changes the user name through the UserName property of the Application object, and then it displays the User Information dialog box to show that the change has been made.
Use the VBA properties and methods in Word to set the user information without displaying the dialog box. DefaultTab = wdDialogFormatBordersAndShadingTabPageBorder With Dialogs(wdDialogFormatBordersAndShading) The following example displays the Page Border tab in the Borders and Shading dialog box. Set the DefaultTab property to access a particular tab in a Word dialog box. The following example displays the Print dialog box ( wdDialogFilePrint). If a file is selected and OK is clicked, the file is opened (the action is executed). For example, the following macro instruction displays the Open dialog box ( wdDialogFileOpen). To access a particular built-in Word dialog box, you specify a WdWordDialog constant with the Dialogs property. The Show method of the Dialog object displays and executes any action taken in a built-in Word dialog box. You can display a built-in dialog box to get user input or to control Word by using Visual Basic for Applications (VBA). This topic contains information and examples in the following sections.