01-20-2021
07:19 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
01-20-2021
07:19 AM
Hello,
I'm trying to create a macro functionning for all parts if the active document is an assembly, or on the part if it is a part. Something like this :
Dim oRefDocs As DocumentsEnumerator
Dim oRefDoc As Document
Dim odoc As Document
Set odoc = ThisApplication.ActiveDocument
If odoc.DocumentType = kAssemblyDocumentObject Then Set oRefDocs = odoc.AllReferencedDocuments
If odoc.DocumentType = kPartDocumentObject Then Set oRefDocs = odoc
For each oRefDoc in oRefDocs
...
next
The red line does not function, and I'm stuck... any idea ?
Solved! Go to Solution.