clhare
01-04-2008, 06:27 AM
I'm trying to delete a style that may or may not be in the document. Is there a way to check to see if the style exists and if so delete it without getting an error message if it doesn't?
Here's what I have so far, but I still get an error saying that it doesn't exist.
If ActiveDocument.Styles("MyStyle").InUse Then
ActiveDocument.Styles("MyStyle").Delete
End If
Here's what I have so far, but I still get an error saying that it doesn't exist.
If ActiveDocument.Styles("MyStyle").InUse Then
ActiveDocument.Styles("MyStyle").Delete
End If