InvisibleApp.AddUndoUnit Method
Visio Automation Reference |
Adds an object that supports the IOleUndoUnit or IVBUndoUnit interface to the Microsoft Office Visio undo queue.
Version Information
Version Added: Visio 2000
Syntax
expression.AddUndoUnit(pUndoUnit)
expression A variable that represents an InvisibleApp object.
Parameters
Name | Required/Optional | Data Type | Description |
---|---|---|---|
pUndoUnit | Required | [UNKNOWN] | A reference to an object that supports the IOleUndoUnit or IVBUndoUnit interface. |
Return Value
clsVBUndoUnits
Remarks
For information about implementing the IOleUndoUnit interface on your object, see the Microsoft Platform SDK on MSDN, the Microsoft Developer Network. For information about implementing the IVBUndoUnit interface, see Developing Microsoft Visio Solutions on MSDN.
Example
The following procedure shows how to use the AddUndoUnit method to add an object to the Visio undo queue. When a shape is added to the active document, the procedure checks to see if it was added as a result of an undo or redo action, and if not, it adds an Undo unit.
This procedure is a member of class clsParticipateInUndo, which is defined in one of two related class modules in the Code Librarian in the Visio SDK, and is not intended to be run independently. (The other class module defines class clsVBUndoUnits.) For more information on these class modules, see the Visio SDK on MSDN.
Visual Basic for Applications |
---|
|
See Also