11-03-2023
09:50 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
11-03-2023
09:50 AM
Hi @Daan_M
Well, that's what I get for replying without testing my answer... @WCrihfield is correct, we need to use display name here.
I don't have your Excel data, but this stripped-down version of your rule works.
Dim oDoc As AssemblyDocument = ThisApplication.ActiveDocument For Each rDoc As Document In oDoc.AllReferencedDocuments oPartDoc = ThisApplication.Documents.Open(rDoc.FullFileName, True) oPartDoc.Activate Dim oProperty As String = "Description" Dim oSetValue As String = "Hello World" MsgBox(oPartDoc.DisplayName) MsgBox(oProperty & " = " & oSetValue) iProperties.Value(oPartDoc.displayname, "Project", oProperty) = oSetValue oPartDoc.Save() 'oPartDoc.Close Next