But I would need more information like the full qualified file name of the CSV file, the full qualified file name of log file to modify, which character is used as separator in the CSV file, is it necessary to handle also find/replace strings containing the separator, run the replaces case-sensitive or case-insensitive. That would be no problem for me and according to what you posted already, it could write the script quite quickly. Please let me know if one of the existing script or macro solutions can be used by you for your task with small modifications by yourself or if I should write a new script for you.
One of the older macro solutions is posted at How to Perform a Find & Replace via Macro using a source file.
In general it is most efficient that the file to modify with a series of finds and replaces is not opened at all in UltraEdit, but command Replace in Files is used to modify this single file as in this case no undo steps are recorded, no line change indications, etc. A macro could be created by simply recording the replaces done once manually. Please do let me know if you have any questions on this topic.An UltraEdit macro or UltraEdit script is used for such a task in general. 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.