Macro Reference — Document Object — Name Property (Document Object)

# Name Property (Document Object)

Retrieves the file name of the document without its path, or renames the file name of the document. If the document is untitled, renames the document title without saving the file.

##

### [JavaScript]

    strName = document.Name;
    document.Name = strName;

### [VBScript]

    strName = document.Name
    document.Name = strName

## Examples

### [JavaScript]

    alert( document.Name );

### [VBScript]

    alert document.Name

## Version

Supported on EmEditor Professional Version 4.00 or later.