none
Seeing UNC path not project file name RRS feed

  • Question

  • I'm using a resource pool for several projects. When I look at the resource usage view for the resource pool I see the UNC path for any project that is not open. Is there any way to not use the UNC path but rather the file name like I do when the project is actually open?

    Friday, October 11, 2013 7:16 PM

Answers

  • hshayhorn,

    Yes there is a way to do it, but it requires a little macro magic. First, open each sharer file and run the following code:

    Sub JustTheFileNam()
    Dim r As Resource
    Dim a As Assignment
    For Each r In ActiveProject.Resources
        For Each a In r.Assignments
            On Error Resume Next
            a.Text1 = a.Project
            On Error GoTo 0
        Next a
    Next r
    End Sub

    Save each sharer file. Now when you open the resource pool and none of the sharer files, display the Text1 field when in the Resource Usage view. It will show just the sharer file name without the full path.

    John

    Friday, October 11, 2013 11:19 PM

All replies

  • I assume you're looking at the Project column? That's what it does i'm afraid. No option to change it.

    Rod Gill

    The one and only Project VBA Book

    Rod Gill Project Management

    Friday, October 11, 2013 7:32 PM
    Moderator
  • hshayhorn,

    Yes there is a way to do it, but it requires a little macro magic. First, open each sharer file and run the following code:

    Sub JustTheFileNam()
    Dim r As Resource
    Dim a As Assignment
    For Each r In ActiveProject.Resources
        For Each a In r.Assignments
            On Error Resume Next
            a.Text1 = a.Project
            On Error GoTo 0
        Next a
    Next r
    End Sub

    Save each sharer file. Now when you open the resource pool and none of the sharer files, display the Text1 field when in the Resource Usage view. It will show just the sharer file name without the full path.

    John

    Friday, October 11, 2013 11:19 PM
  • If you want a no-code, low tech answer, change the alignment of the Project field to "right" and then narrow the column to only show the file name.
    Monday, October 14, 2013 9:16 PM
    Moderator
  • This code works great. My only question would be could the field "Text 1" be made to to display as "Project Name:" or am I stuck with Text1?
    Tuesday, October 15, 2013 1:39 PM
  • hshayhorn,

    To answer your first question, once you have set up the Text1 field with the project name info, in the pool file select the Text1 field and go to Project/Custom Fields and then hit the Rename button. Name the field whatever you want.

    As far as your other issue is concerned, my initial guess is that the sharer file that displays the "weird" result is corrupt. Unfortunately file corruption is more prevalent in a linked structure (e.g. pool/sharer) and even more so if the structure is operated over a network. Try disconnecting that file from the pool, save the sharer file as XML, then re-open in Project and re-connect to the pool. Note, you will lose any custom formatting you have in that sharer file.

    John

    Tuesday, October 15, 2013 3:01 PM