CAD software discussion forum > CAD > Not delete a text style

Not delete a text style

Rank: 1

Stas

Newbie

posts: 0

Registered: 2012-1-12

Message 1 of 1

25-11-2011 07:34 . am | View his/her posts only
Hi all!
I can't remove text syle
  1. Sub DeleteTextStyle()
  2. Dim i As Integer
  3. Dim ts As ZwcadTextStyle
  4. 'get text style
  5. Set ts = ThisDocument.TextStyles.Item("TEXT")
  6. 'delete this
  7. ts.Delete
  8. End Sub
Copy Code


It works in ZWCad 2009 but does not work in 2011 (VERNUM 2011.06.30(16923))
Of course, document contains a text style 'TEXT'

Error: Method 'Delete' of object 'IIcadTextStyle' failed



Sorry for bad english
Thanks! svol2011-11-25 07:41:03
See also