Share via


Description Property [Visio 2003 SDK Documentation]

Gets or sets the description of a document, one of a document's properties. Gets or sets the description of a hyperlink. Gets the description of an IVBUndoUnit interface.

strRet = object**.Description**

object**.Description** = stringExpression

strRet     String. The current string that describes the document.

object     Required. An expression that returns a Document or Hyperlink object or an IVBUndoUnit interface.

stringExpression     Required String. The new string to describe the document. Not applicable for the IVBUndoUnit interface.

Version added

2.0

Remarks

Setting a document's Description property is equivalent to entering information in the Description box in the Properties dialog box (File menu).

Security  Use this feature with caution. Sensitive or confidential information could be revealed to other users.

Setting a hyperlink's Description property is equivalent to entering information in the optional Description box in the Hyperlinks dialog box (Insert menu). It is also equivalent to setting the result of the Description cell of the shape's Hyperlink row.

The Description property of the IVBUndoUnit interface is read-only. It returns a string that describes the undo unit and appears in the Undo list on the Standard toolbar. For more information about the Description property as it applies to the IVBUndoUnit interface, search for "creating undo units" on MSDN.

Example

This Microsoft Visual Basic for Applications (VBA) macro shows how to use the Description property to document the description of a drawing. It adds a Document object to the Documents collection and sets the Document object's Description property as well as other document properties.

Before running this macro, substitute your own values for the items in italic in the following code. To verify that these properties have been set, open the Properties dialog box (File menu).

Public Sub Description_Example() 

    Dim vsoDocument As Visio.Document 

    Set vsoDocument = Documents.Add("") 

    'Set the properties of the document. 
    vsoDocument.Title = "document title" 
    vsoDocument.Creator = "author name" 
    vsoDocument.Description = "document description" 
    vsoDocument.Keywords = "keyword1, keyword2, keyword3" 
    vsoDocument.Subject = "document subject" 
    vsoDocument.Manager = "manager name" 
    vsoDocument.Category = "document category" 

End Sub

Applies to | Document object | Hyperlink object

See Also | Category property | Company property | Creator property | HyperlinkBase property | Keywords property | Manager property | Subject property | Title property