Message 1 of 8
Loop on all parts and then after its occurrences
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I am looking for code which will loop for all items and then for all occurrences of this part.
Sub main InvDoc = ThisDoc.Document Dim refDocs As DocumentsEnumerator = InvDoc.AllReferencedDocuments Dim refDoc As Document For Each refDoc In refDocs 'loop for all files FileName = refDoc.FullDocumentName.Substring(refDoc.FullDocumentName.LastIndexOf("\") + 1) MessageBox.Show(FileName, "Title") 'Loop for all occurances in "FileName" 'example: 'Part1:1 'Part1:2 'Part1:3 'Part1:4 Next End Sub