FullName Property

As it applies to the Project object.

Returns the path and file name of a project. Read-only String.

Remarks

The FullName property returns the project name (as seen in the title bar) for an unsaved project.

As it applies to the LookupTableEntry object.

Returns the full name for the specified level and parent levels of the LookupTableEntry for the outline code, complete with the separator string between the levels. Read-only String.

Example

As it applies to the Project object.

The following example prompts the user for the full name of a file and then closes the file, saving it if it has changed.

Sub CloseFile()
    Dim P As Project        ' Project object used in For Each loop
    Dim FileName As String  ' Full name of a file

    ' Prompt user for the full name of a file.
    FileName = InputBox$("Close which file? Include its path: ")

    ' Search the open projects for the file.
    For Each P In Application.Projects
    
        ' If the file is found, close it.
        If P.FullName = FileName Then
            P.Activate
            FileClose pjSave
            Exit Sub
        End If
    Next P

    ' Inform user if the file is not found.
    MsgBox ("Could not find the file " & FileName & ".")

End Sub

As it applies to the LookupTableEntry object.

The CreateLocationOutlineCode macro example sets three LookupTableEntry levels for a custom task outline code named Location. After the CreateLocationOutlineCode macro is executed, entering the following line in the Immediate window of the Visual Basic Editor in Microsoft Office Project 2003 returns the result shown.

Print ActiveProject.OutlineCodes.Item(1).LookupTable.Item(4).FullName
WA.KING.RED

CreateLocationOutlineCode

Sub CreateLocationOutlineCode()

    Dim objOutlineCode As OutlineCode
    On Error GoTo ErrorHandler
    
    Set objOutlineCode = ActiveProject.OutlineCodes.Add( _
        pjCustomTaskOutlineCode1, "Location")
    
    objOutlineCode.OnlyLookUpTableCodes = True
    
    DefineLocationCodeMask objOutlineCode.CodeMask
    EditLocationLookupTable objOutlineCode.LookupTable
    End
    
ErrorHandler:
    MsgBox "CreateLocationOutlineCode(): Error Number: " & Err.Number & _
        vbCrLf & "    Error Description: " & Err.Description
End Sub


Sub DefineLocationCodeMask(objCodeMask As CodeMask)
   objCodeMask.Add _
        Sequence:=pjCustomOutlineCodeUppercaseLetters, _
        Length:=2, Separator:="."
    
   objCodeMask.Add _
        Sequence:=pjCustomOutlineCodeUppercaseLetters, _
        Separator:="."
    
   objCodeMask.Add _
        Sequence:=pjCustomOutlineCodeUppercaseLetters, _
        Length:=3, Separator:="."
End Sub


Sub EditLocationLookupTable(objLookupTable As LookupTable)
    Dim objStateEntry As LookupTableEntry
    Dim objCountyEntry As LookupTableEntry
    Dim objCityEntry As LookupTableEntry
    
    Set objStateEntry = objLookupTable.AddChild("WA")
    objStateEntry.Description = "Washington"
    
    Set objCountyEntry = objLookupTable.AddChild("KING", _
        objStateEntry.UniqueID)
    objCountyEntry.Description = "King County"
    
    Set objCityEntry = objLookupTable.AddChild("SEA", _
        objCountyEntry.UniqueID)
    objCityEntry.Description = "Seattle"
    
    Set objCityEntry = objLookupTable.AddChild("RED", _
        objCountyEntry.UniqueID)
    objCityEntry.Description = "Redmond"
    
    Set objCityEntry = objLookupTable.AddChild("KIR", _
        objCountyEntry.UniqueID)
    objCityEntry.Description = "Kirkland"
End Sub

Applies to | LookupTableEntry Object | Project Object, Projects Collection Object

See Also | HasPassword Property | Name Property | Path Property | ReadOnly Property | ReadOnlyRecommended Property | Saved Property