09-03-2018
11:34 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
09-03-2018
11:34 PM
Thanks for your help guys, but i actually found another method that someone had posted for a similar scenario that is working well for me using 'count'.
For Each aDoc In oDoc.AllReferencedDocuments 'Check if referenced document is a Part file. If aDoc.DocumentType = kPartDocumentObject Then FNamePos = InStrRev(aDoc.FullFileName, "\", - 1) docFName = Mid(aDoc.FullFileName, FNamePos + 1, Len(aDoc.FullFileName) - FNamePos) iProperties.Value(docFName, "Project", "Project") = ORDER_NUMBER iProperties.Value(docFName, "Summary", "Company") = PROJECT quantityValue = oADO.AllReferencedOccurrences(aDoc).Count iProperties.Value(docFName, "Summary", "Comments") = quantityValue End If Next