paperworker
Technical User
I'm new at using VBA (using MSWord 2003). I'm trying to create a macro that deletes user-defined styles in ActiveDocument that are no longer needed or used. I've tried various solutions. For example:
ActiveDocument.Styles("1.1")Delete
ActiveDocument.Styles("1.1.1")Delete
and so forth, works until it tries to delete a style that doesn't happen to exist in a particular document. I've tried deleting using Organizer.Delete with loops, If-Then-Else staements, Case-If, and nothing has worked. The documentation has been cryptic and difficult to understand.
Any hints, tips, help would be appreciated...I don't know what else to try.
ActiveDocument.Styles("1.1")Delete
ActiveDocument.Styles("1.1.1")Delete
and so forth, works until it tries to delete a style that doesn't happen to exist in a particular document. I've tried deleting using Organizer.Delete with loops, If-Then-Else staements, Case-If, and nothing has worked. The documentation has been cryptic and difficult to understand.
Any hints, tips, help would be appreciated...I don't know what else to try.