on-internet
← Community

Macro to find multiple strings and insert text (specific to each string) at the end of each occurrence

Stack Overflow ·

The scenario: Word documents that contain a selection of sentences (strings). There might be up to 30 possible strings (which vary from 5 to 20 words in length). The document will contain only a selection of these strings. Aim: Macro that searches through the document, finds each occurrence of a particular string and inserts a specific text code (such as " (ACWD2553)") after each occurrence. This is repeated for all the other strings in the set, with each different string having it's own distinct code. Some strings won't be in the document. The strings can be located in document body and table

Comments

Sign in or sign up to comment and upvote.

No comments yet.