Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

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