![mac microsoft word find and replace mac microsoft word find and replace](https://i.ytimg.com/vi/7j92Py8J3qg/hqdefault.jpg)
Sub MyMacro()ĭim search_strings(1 To 2, 1 to 2) As String That is just an idea I had, it could be way off. Then you can loop through to get the replacement values. This may be completely off and I may look like a fool but have you tried using a two dimensional array so you can store the values with their replacements in the two dimensional array. Reply = MsgBox("Replace '" & & "'?", vbYesNoCancel) ' Loop through each match in the documentĭo While (this_search_string) ' Define the search range to be the whole document ' Run a search for each string in the array of strings to matchįor Each this_search_string In search_strings If a complete line is to be deleted, and you end the Find criteria with l (caret+lower case L), that entire line and the space it occupies will disappear, and the rest of the document will move up one line. Everything that matches the Find criteria will disappear. (Currently, I get this error: Compile error: User-defined type not defined.) Find and Replace is functionally identical to Find and Delete if you enter nothing into the Replace field. I've tried using a dictionary, like this: Dim dict As New Scripting.Dictionaryīut for that to work, I need to reference Microsoft Scripting Runtime, which isn't available on Mac OS X. In the Find and Replace dialog box, enter into the Find what text box to find the cells which have the character, and then type the value which you want to replace with in Replace with text box, see screenshot: Can you get microsoft project for mac. I know that I need some sort of key/value pair.
Mac microsoft word find and replace how to#
But I can't figure out how to store and reference the corresponding replacement text. I can loop through this array with a For Each loop. I've created an array to store the strings to match: Dim search_strings(1 To 2) As String I'm working on a macro to loop through a series of strings ( a1, a2, a3) and replace them with a series of corresponding values ( b1, b2, b3).