Message 1 of 7

Not applicable
05-27-2015
02:04 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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.