FileName Property

This page is specific to the Visual Basic for Applications (VBA) Language Reference for Office 2010.

Returns the full path name of the project file or host document.

Syntax

object**.Filename**

The object placeholder represents an object expression that evaluates to an object in the Applies To list.

Remarks

Projects have no name other than the file name.

The path name returned is always provided as an absolute path (for example, "c:\projects\myproject.vba"), even if it is shown as a relative path (such as "..\projects\myproject.vba").