Assistant.DoAlert Method

Definition

Displays an alert and returns an Integer that indicates which button the user pressed.

public:
 int DoAlert(System::String ^ bstrAlertTitle, System::String ^ bstrAlertText, Microsoft::Office::Core::MsoAlertButtonType alb, Microsoft::Office::Core::MsoAlertIconType alc, Microsoft::Office::Core::MsoAlertDefaultType ald, Microsoft::Office::Core::MsoAlertCancelType alq, bool varfSysAlert);
public int DoAlert (string bstrAlertTitle, string bstrAlertText, Microsoft.Office.Core.MsoAlertButtonType alb, Microsoft.Office.Core.MsoAlertIconType alc, Microsoft.Office.Core.MsoAlertDefaultType ald, Microsoft.Office.Core.MsoAlertCancelType alq, bool varfSysAlert);
abstract member DoAlert : string * string * Microsoft.Office.Core.MsoAlertButtonType * Microsoft.Office.Core.MsoAlertIconType * Microsoft.Office.Core.MsoAlertDefaultType * Microsoft.Office.Core.MsoAlertCancelType * bool -> int
Public Function DoAlert (bstrAlertTitle As String, bstrAlertText As String, alb As MsoAlertButtonType, alc As MsoAlertIconType, ald As MsoAlertDefaultType, alq As MsoAlertCancelType, varfSysAlert As Boolean) As Integer

Parameters

bstrAlertTitle
String

Sets the title of the alert.

bstrAlertText
String

Sets the text of the alert.

alb
MsoAlertButtonType

Determines which buttons are displayed on the alert.

alc
MsoAlertIconType

Determines the icon that is displayed on the alert.

ald
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
MsoAlertCancelType

Always set this to msoAlertCancelDefault. Any other setting may return an error.

varfSysAlert
Boolean

True if the alert is displayed in a message box or False if the alert is displayed through the Office Assistant.

Returns

Applies to