Message 1 of 8
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Did anyone ever use openwithoptions for modelstates. The idea is to open something in a defined modelstates. I dont want to change the modelstate after opening. It should open in the correct one directly.
I saw that there are options that can be provided but im not exactly sure how to use them. This is what I have so far:
Dim oRefDocs As DocumentsEnumerator
oRefDocs = ThisAssembly.Document.AllReferencedDocuments
Dim fileOpenOptions As NameValueMap
fileOpenOptions = ThisApplication.TransientObjects.CreateNameValueMap
fileOpenOptions.Add("DefaultModelStateInPart", "Quader")
For Each oSubDoc In oRefDocs
ThisApplication.Documents.OpenWithOptions(oSubDoc.FullDocumentName,fileOpenOptions, True)
Next
This fails on line 10. I think the provided options value is wrong.
regards
Tobias
Solved! Go to Solution.