M
Mark
I'm pulling my hair out on this one. I've got a document
w/ several protected sections. In the event that the text
in one of the unprotected sections is accidently deleted,
I've written a macro to replace the text and tag it with
some required character and paragraph styles.
Here's the catch: when I execute the macro, I get a
Runtime error 4605 - "This method or property is not
available because the object refers to a protected area of
the document."
Yet, when I set a breakpoint on and step through
the "Selection.Style = ActiveDocument.Styles" line, it all
works as expected.
Here's all i'm trying to do:
Selection.MoveRight unit:=wdCharacter, Count:=17,
Extend:=wdExtend
Selection.Style = ActiveDocument.Styles
("IntelinkSummaryTitle")
Selection.MoveRight unit:=wdCharacter, Count:=7
w/ several protected sections. In the event that the text
in one of the unprotected sections is accidently deleted,
I've written a macro to replace the text and tag it with
some required character and paragraph styles.
Here's the catch: when I execute the macro, I get a
Runtime error 4605 - "This method or property is not
available because the object refers to a protected area of
the document."
Yet, when I set a breakpoint on and step through
the "Selection.Style = ActiveDocument.Styles" line, it all
works as expected.
Here's all i'm trying to do:
Selection.MoveRight unit:=wdCharacter, Count:=17,
Extend:=wdExtend
Selection.Style = ActiveDocument.Styles
("IntelinkSummaryTitle")
Selection.MoveRight unit:=wdCharacter, Count:=7