VBA Macro doesn’t work if the selection is only have 1 instance of the searched character
I am writing a macro that turns selected asterisk characters into superscripted asterisk. Selection is important since I don’t want to mess up my document completely. Here is the code:
How can I use VBA to create a macro in MS Word which will find text which contains a paragraph mark while ignoring any tracked revisions?
Background – In Word 2016, one can use the Find/Replace advance dialog to search for something like [sometext]^p[moretext]
where the “^p” is the paragraph mark, and then replace it with just ^p
to remove the unwanted text. This all works as expected.
VBA macro to find all instances in a doc of a string, e.g., “a dog”, and insert in tracked a reference numeral, e.g., (102), immediately afterwards
I’d like a VBA macro in word to find all instances of a user-selected string in a document (e.g., “a dog”) and insert a corresponding user-selected reference numeral in parentheses (e.g., “(102)”) immediately following each string.
Find all instances of a string, e.g., “a dog”, and insert *in tracked* a reference numeral, e.g., (102), immediately afterwards
I’d like a VBA macro in word to find all instances of a user-selected string in a document (e.g., “a dog”) and insert a corresponding user-selected reference numeral in parentheses (e.g., “(102)”) immediately following each string.
Find all instances of a string, e.g., “a dog”, and insert *in tracked* a reference numeral, e.g., (102), immediately afterwards
I’d like a VBA macro in word to find all instances of a user-selected string in a document (e.g., “a dog”) and insert a corresponding user-selected reference numeral in parentheses (e.g., “(102)”) immediately following each string.