Anonymous
498 Views, 6 Replies
05-27-2015
02:04 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
05-27-2015
02:04 AM
I tried to add title block in many ways (using macro) but without success.
Here is a code:
Sub test()
Dim odrawdoc As DrawingDocument
Set odrawdoc = ThisApplication.ActiveDocument
Dim oNewTitleBlockDef As TitleBlockDefinition
Dim oSheet As Sheet
Dim titleblock As titleblock
Set oSheet = odrawdoc.ActiveSheet
Set oNewTitleBlockDef = odrawdoc.TitleBlockDefinitions.Item(1)
Set titleblock = oSheet.addTitleBlock(oNewTitleBlockDef)
' Call oSheet.addTitleBlock(oNewTitleBlockDef)
End Sub
I got run time error 5 on line :
Set titleblock = oSheet.addTitleBlock(oNewTitleBlockDef)
what is wrong?
Michal
Solved! Go to Solution.