List Referenced Files Macro - How do I get the description variable to be listed too?

Hi,

I have the following macro that I have taken from Wayne Matus' "Automating ECN's process using XML" presentation.

<p>Sub UpdateAffectedList()</p><p>    Dim xlWS As Worksheet</p><p>    Dim rAffects As Range</p><p>    Dim i As Integer</p><p>    Dim strDocumentPath As String</p><p>    Dim oVault As New EdmVault5</p><p>    Dim oFile As IEdmFile6</p><p>    Dim oFolder As IEdmFolder6</p><p>    Dim projName As String</p><p>    Dim oRef As IEdmReference5</p><p>    Dim msg As String</p><p>    Dim pos As IEdmPos5</p><p>    Dim ref As IEdmReference5</p><p>    Dim xx As String</p><p>    </p><p>    Set xlWS = ThisWorkbook.Worksheets("Sheet1")</p><p>    Set rAffects = xlWS.Range("affects")</p><p>    strDocumentPath = ThisWorkbook.FullName</p><p>    oVault.LoginAuto oVault.GetVaultNameFromPath(strDocumentPath), 0</p><p>    Set oFile = oVault.GetFileFromPath(strDocumentPath, oFolder)</p><p>    If Not oFile Is Nothing Then</p><p>        rAffects.Value = ""</p><p>        i = 1</p><p>        Set oRef = oFile.GetReferenceTree(oFolder.ID, 0)</p><p>        Set pos = oRef.GetFirstChildPosition(projName, True, True, 0)</p><p>        While Not pos.IsNull</p><p>            Set ref = oRef.GetNextChild(pos)</p><p>            xx = "conisio://" & oVault.Name & "/open?projectid=" & ref.FolderID & "&documentid=" & ref.FileID & "&objecttype=1"</p><p>            xlWS.Hyperlinks.Add Anchor:=rAffects.Cells(i, 1), Address:=xx, TextToDisplay:=ref.File.Name</p><p>            i = i + 1</p><p>        Wend</p><p>    End If</p><p>    </p><p>End Sub</p>

It's works brilliantly and lists the referenced FILE NAMES within a named range in excel (called affects)

Is it possible for it to list the 'DESCRIPTION' variable for each file in the cell to the left of each file name?

So instead of this:

It would paste the description of each file next to it like this:

Thanks in advance for any help, this could be a real time saver for our ECN process.

Cheers, Jack

SolidworksSolidworks Pdm enterprise Pdm