nameProp Property

Returns a String that represents the file name of the specified document.

expression.nameProp

*expression   * Required. An expression that returns one of the objects in the Applies To list.

Example

The following example inserts the file name of the active document into the document.

Sub InsertDocumentName()
    With ActiveDocument
        .body.insertAdjacentHTML where:="beforeend", _
            HTML:="<p id=""newpara2"">" & .nameProp & "</p>"
    End With
End Sub

Applies to | FPHTMLAnchorElement Object | FPHTMLDocument Object | FPHTMLImg Object | IHTMLAnchorElement Object | IHTMLDocument2 Object | IHTMLImgElement Object