Message 1 of 6

Not applicable
05-21-2021
01:38 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi, Tried looping for each model in assembly. But I had a mistake every time. Can someone help me change this code:
Public Sub AddUsingSheetFormat()
Dim oDrawDoc As DrawingDocument
Set oDrawDoc = ThisApplication.ActiveDocument
Dim oFormat As SheetFormat
Set oFormat = oDrawDoc.SheetFormats.Item("test")
'Open the model document invisible
Dim oModel As Document
Set oModel = ThisApplication.Documents.Open("C:\Users\zlozenie.iam", False)
'Create a new sheet based on the sheet format
Dim oSheet As Sheet
Set oSheet = oDrawDoc.Sheets.AddUsingSheetFormat(oFormat, oModel)
End Sub
Solved! Go to Solution.