Sorry, I got waylaid by other items, mainly family issues. Thank you for the input. I finally got back to looking at this.
Let's ignore the cross-referencing for now, since you point out the issues with that. (Thank you for the explanation.)
For the manipulation of text in the newDoc, this is a simple find and replace (e.g., replace the word X with the word Y or change the snippet "A B C" to "C D E F G", where the capital letters are words).
Normally, I do something like this for the original document (with a section selected):
Code:
' Replaces tab character with two spaces
With Selection.Find
.Text = "^t"
.Replacement.Text = " "
.Forward = True
.Wrap = wdFindStop
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
' I think this actually causes the replacement to happen
Selection.Find.Execute Replace:=wdReplaceAll
This is just one example where I replace a tab character with two spaces.
How do I perform the same replacement in newDoc, then copy all the (modified) text there back into the original document?