- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
The font size for borders in the Active Standard Style in my drawing document is set to 0.120.
When I add a default border manually through the browser by right-clicking 'Default Border' and choosing 'Insert Drawing Border...', the new border has the correct font size.
However, when I add a default border through the api using the code below, the new border's font size is much too large.
ThisDrawing.Document.ActiveSheet.AddDefaultBorder()
Added Manually
Added Through API
Seems like this should be simple to do, but I'm stuck. When I try reading the documentation, I can't get the sample code for AddDefaultBorder() with arguments included to work, so I'm not sure if it is properly documented. I just need to get the correct font size. If there's a way to change it after inserting the border, that would be a good enough solution as far as I'm concerned.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I finally figured it out. Here's the solution in case anyone with a similar problem finds this post:
oTextStyle = ThisDrawing.Document.StylesManager.TextStyles("Text Style Name")
ThisDrawing.Document.ActiveSheet.AddDefaultBorder(TextStyle:= oTextStyle)