Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

sorry..I think your code is fine.

I see why the borders are referenced. It is because my drawing template has sheet formats in it.

Jakob_Hamburg_2-1732181936712.png

Those somehow keep the borders referenced.

I should get those deleted first. (But have to figure out why they are there in the first place.)

 

I added a piece of code in your code above (after line 33). now it is working.

I added:

	'delete all sheet formats
		For Each oSFDef As SheetFormat In oDrawingDoc.SheetFormats
   			 oSFDef.Delete
		Next
	
	'delete all unreferenced TitleBlockDefinitions