Hi Peter,
Removing the 'With' 'End With' and having 'Selection.Style = "Normal"' means the Style gets applied to the document! If you delete the 'With' 'End With', you merely make the code less efficient and you also need to use 'Shp.TextFrame.TextRange.Style = "Normal"'.
I note too that you've deleted the code that defines and sets the Rng variable. That'll cause problems when you get to 'Rng.Select'. Failure to collapse the Selection is also liable to cause problems when you use 'Selection.Paste' after '.Anchor.Cut'.
When you run the unmodified code, per post #6 above, what is selected? Is it text in the body of the document, or something else?
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
|