Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
richard.joseph.pollak
553 Views, 1 Reply

Set Border With Font Size Through API

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 ManuallyAdded ManuallyAdded Through APIAdded 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.