OutlookBarGroups.BeforeGroupRemove Event
Outlook Developer Reference |
Occurs before a new group is removed from the Shortcuts pane, either as a result of user action or through program code.
Syntax
expression.BeforeGroupRemove(Group, Cancel)
expression A variable that represents an OutlookBarGroups object.
Parameters
Name | Required/Optional | Data Type | Description |
---|---|---|---|
Group | Required | OutlookBarGroup | The OutlookBarGroup that is being removed. |
Cancel | Required | Boolean | False when the event occurs. If the event procedure sets this argument to True, the group is not removed from the Shortcuts pane. |
Remarks
This event is not available in Microsoft Visual Basic Scripting Edition (VBScript).
Example
This Microsoft Visual Basic/Visual Basic for Applications (VBA) example prevents the user from removing a group from the Shortcuts pane. The sample code must be placed in a class module such as ThisOutlookSession
, and the Initialize_handler
routine must be called before the event procedure can be called by Outlook. You will still be prompted when you try to delete a shortcut. However, the group will not be deleted even if you clicked Yes.
Visual Basic for Applications |
---|
|
See Also