Explorer.BeforeItemPaste Event
Outlook Developer Reference |
Occurs when an Outlook item is pasted.
Syntax
expression.BeforeItemPaste(ClipboardContent, Target, Cancel)
expression A variable that represents an Explorer object.
Parameters
Name | Required/Optional | Data Type | Description |
---|---|---|---|
ClipboardContent | Required | Variant | The content to be pasted. |
Target | Required | Folder | The destination of the paste. |
Cancel | Required | Boolean | False when the event occurs. If the event procedure sets this argument to True, the operation is not completed and the item is not deleted. |
Remarks
This event can be cancelled after it has started.
Example
The following Microsoft Visual Basic/Visual Basic for Applications (VBA) example prompts the user before pasting the contents of the Clipboard to the specified target. If the user clicks Yes, the current content in the Clipboard is copied to the specified target destination. 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.
Visual Basic for Applications |
---|
|
See Also