PUBLIC oWord oWord = CREATEOBJECT("Word.Application") oWord.Visible = .T. oWord.Assistant.DoAlert("Alert Title", "Alert Text",0,4,0,-1,0) TEXT NOSHOW -- 1 -- -- 2 -- -- 3 -- Specifies the buttons to be displayed when issuing an alert to the user with the DoAlert method of the Assistant object. Name Value Description msoAlertButtonAbortRetryIgnore 2 Abort, Retry, and Ignore buttons. msoAlertButtonOK 0 OK button. msoAlertButtonOKCancel 1 OK and Cancel buttons. msoAlertButtonRetryCancel 5 Retry and Cancel buttons. msoAlertButtonYesAllNoCancel 6 Yes, Yes to All, No, and Cancel buttons. Can only be used if the varSysAlert argument of the DoAlert method is set to False. msoAlertButtonYesNo 4 Yes and No buttons. msoAlertButtonYesNoCancel 3 Yes, No, and Cancel buttons. -- 4 -- Specifies which icon, if any, to display with an alert. Name Value Description msoAlertIconCritical 1 Displays the Critical icon. msoAlertIconInfo 4 Displays the Info icon. msoAlertIconNoIcon 0 Displays no icon with the alert message. msoAlertIconQuery 2 Displays the Query icon. msoAlertIconWarning 3 Displays the Warning icon. -- 5 -- Specifies which button is set as the default when calling the DoAlert method of the Assistant object. Name Value Description msoAlertDefaultFifth 4 Default to fifth button. msoAlertDefaultFirst 0 Default to first button. msoAlertDefaultFourth 3 Default to fourth button. msoAlertDefaultSecond 1 Default to second button. msoAlertDefaultThird 2 Default to third button. -- 6 -- Specifies behavior when the user cancels an alert. Only msoAlertCancelDefault is currently supported. Name Value Description msoAlertCancelDefault -1 Default behavior for canceling an alert. msoAlertCancelFifth 4 Not supported. msoAlertCancelFirst 0 Not supported. msoAlertCancelFourth 3 Not supported. msoAlertCancelSecond 1 Not supported. msoAlertCancelThird 2 Not supported -------------------------------------------- DoAlert Parameters Name Required/Optional Data Type Description bstrAlertTitle Required String Sets the title of the alert. bstrAlertText Required String Sets the text of the alert. alb Required MsoAlertButtonType Determines which buttons are displayed on the alert. alc Required MsoAlertIconType Determines the icon that is displayed on the alert. ald Required MsoAlertDefaultType Determines which button is set as the default button of the alert. If this argument is set to a value greater than the number of buttons, an error is returned. alq Required MsoAlertCancelType Always set this to msoAlertCancelDefault. Any other setting may return an error. varfSysAlert Required Boolean. Ignored in Word 2007. ENDTEXT