R
Rachel
Hi,
I tried running the following macro from Cindy Meister, changing the Heading
2 Char to be Char Char Char Char etc. as in my document. For some reason, it
did not work. It would not accept the Set styl =
doc.Styles.Add(Name:="Style1") line and I did not know how to debug it. Does
there have to be a style called Style1 in order for it to work? Do I need to
create one? It did not create one itself as far as I could tell.
Regards,
Rachel (see macro below)
Sub DeleteHeading2Char()
Dim styl As Word.Style, doc As Word.Document
Set doc = ActiveDocument
Set styl = doc.Styles.Add(Name:="Style1")
On Error Resume Next
doc.Styles("Heading 2 Char").LinkStyle = styl
styl.Delete
End Sub
I tried running the following macro from Cindy Meister, changing the Heading
2 Char to be Char Char Char Char etc. as in my document. For some reason, it
did not work. It would not accept the Set styl =
doc.Styles.Add(Name:="Style1") line and I did not know how to debug it. Does
there have to be a style called Style1 in order for it to work? Do I need to
create one? It did not create one itself as far as I could tell.
Regards,
Rachel (see macro below)
Sub DeleteHeading2Char()
Dim styl As Word.Style, doc As Word.Document
Set doc = ActiveDocument
Set styl = doc.Styles.Add(Name:="Style1")
On Error Resume Next
doc.Styles("Heading 2 Char").LinkStyle = styl
styl.Delete
End Sub