Name Property

A String type value. The name for the instance of an object in the Applies to list.

Applies to: Document object, Layer object, Library object, Master object, Page object, ServObj object, Shape object, Style object

Syntax

[[Let] nameRet =] object.Name

[Let] object.Name = nameSet

The Name property syntax has these parts:

Part Description
object Required. An expression that returns an object in the Applies to list.
nameRet Optional. A String type variable.
nameSet Required. An expression that returns a String value. The new filename of the document/library.

Remarks

Below is the meaning of the Name property for different objects:

Object Name property description
Document

Gets or sets the name of the document under which it will be saved. Don't confuse Name with the FullName, Path or Title properties, as Name is used only for working with filenames which don't include the full path. If you change the Name property, the FullName property is changed as well (FullName represents concatenated Name and Path strings.)

Library Gets and sets the file name of the library. Has the same meaning and function as the Name property of a document.
Master The name (title) of a master object (library object).
Page The name (title) of a document page.
ServObj The name (title) of a service object.
Style

The name (title) of a style in the style collection of a document. It is unique within the scope of the style collection of the document.

Shape The name (title) of a shape.
Layer The name (title) of a layer.

Example

This example contains an application-level script. It demonstrates using the Name property of different objects.

TRACE thisDoc.Name
TRACE thisApp.Lib(1).Name
TRACE thisApp.Lib(1).Master(1).Name
TRACE thisPage.Name
TRACE thisPage.ServObj(1).Name
TRACE thisDoc.Style(1).Name
TRACE thisShape.Name
TRACE thisDoc.Layer(1).Name

 

See Also

FullName property, Path property, Title property