Share via


Document.UndoCheckOut Method

Visio Automation Reference

Closes a Microsoft Office Visio document checked out from a Microsoft Office SharePoint Server site, deletes the local copy of the document, discarding any changes, undoes the checkout, and then reopens the document.

Version Information
 Version Added:  Visio 2007

Syntax

expression.UndoCheckOut

expression   An expression that returns a Document object.

Return Value
Nothing

Remarks

Calling the UndoCheckOut method is the equivalent of clicking Discard Check Out on the File menu in the Visio user interface.

Example

This Microsoft Visual Basic for Applications (VBA) macro shows how to use the UndoCheckOut method to undo the checkout of the active document from a SharePoint server. Before running this macro, check out a Visio document from a SharePoint Portal Server site.

Visual Basic for Applications
  Public Sub UndoCheckOut_Example
    Visio.ActiveDocument.UndoCheckOut
End Sub

See Also