Do subscribe my blog and keep on receiving great tips that will help you achieve greater productivity at work place. I keep on writing articles about time saving MS-Word tips. You can write this macro by going in the Visual Basic Editor of Microsoft Word. Needless to say, both the strings should have equal number of values and obviously the sequence of the values does matter. Each item in this list will be replaced by the corresponding value given in StrNew string. In this macro program, the comma separated values in StrOld are the items to be replaced. Replacement.Text = Split(StrNew, ',')(i) For multiple find and replace, you can use a module like given below (I found it on Internet): Sub MultiReplace()ĭim RngFind As Range, RngTxt As Range, i As Longįor i = 0 To UBound(Split(StrOld, ',')) All you need is to write a macro and then keep running it on the target documents. Well, the answer has to involve a macro! Several tasks can be executed in any MS Word document by the way of macros.Ī macro is a set of several commands put together in a particular sequence. Now the question was how to do multiple find and replace operations on one click. I often use Find and Replace facility of MS Word. So, I thought it would be great if I could run several find and replace commands in one go. And that’s what I do! But there are some commonly occurring mistakes which I have to repeatedly correcting in various documents. In documents that I handle, all pieces of the text invariably need editing. Nowadays, I am working with a lot of Unicode text in MS-Word.
0 Comments
Leave a Reply. |