Title Property

A String value. Gets or sets the title of a document / library.

Applies to: Document object, Library object

Syntax

[[Let] titleRet =] object.Title

[Let] object.Title = titleSet

The Title property syntax has these parts:

Part Description
object Required. An expression that returns an instance of an object from the Applies to list.
titleRet Optional. A String type variable.
titleSet Required. An expression that returns a String value.

Remarks

When object is a document, don't confuse the Title property with the title, displayed in the window title bar of the document. The name in the window title bar is taken from the filename of the document (Name property). When object is a library, the Title property corresponds to the name, displayed in the title bar of the library and is not related to the filename of the library. You can change the Title property from within ConceptDraw in these dialogs: "File->Document Properties->General" for a document, "Library->Library Properties" - for a library.

Example

The example below contains an document level script. It demonstrates how to view the title of the document by creating a shape with the Text property which has the "DocTitle" formula.

Dim shp as Shape

' Set the Title property for the document
thisDoc.Title = "OLD document title"

' Draw a shape
Set shp = thisDoc.Page(1).DrawRect(100,100,700,400)

' Set formula for Text property of shape
shp.Text= ""
shp.SetPropertyFormula( "DocTitle", CDPT_TEXT )
shp.RecalcProperty( CDPT_TEXT )

' Change the Title property of the document
MsgBox("Changing the Title property of the document")
thisDoc.Title = "NEW document title"

 

See Also

Name property, Author property, Subj property, Company property, Desc property