As per the question, trying to replace a span of text in a Word document that is of the form
"<start>..........<end>"
of variable length. It will only occur once in the document.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use Word’s built-in find/replace functionality to do this, eg
This was found from simply recording a macro with Word 2007 and viewing the VBA code. The
.Textproperty can use wildcards, such as*and[A-Z], similar to regular expressions referred to in @Jayantha’s response. The back-slashes are included in the.Textproperty because<and>are wildcard characters too, and the back-slash escapes them. Search for “replace” in the Word help files.