|Find/Replace multiple items
|Page 1 of 1|
|Author:||mwiseman [ 2008-02-26 14:20:51 ]|
|Post subject:||Find/Replace multiple items|
Pretend I have no idea what I'm doing and that I know nothing about perl.
I have done "Record Marcos" in MS Word and done some editing of those macros.
If I had a series of find/replace commands, what would the structure of that be? I can figure out the regular expressions, but what would the blank object be... sort of like the shell of an html document.
My purpose is to move away from word. I get 100-200 ms word docs a month from various sources with different structures and presentational formatting. I need to get them down to lean, economical, AP style documents with limited presentational markup for import into InDesign.
I've used Word for years, but the scripting is beyond me... I'm looking for something simple and elegant. I think NWP will work, I just need the structure to get started.
|Author:||martin [ 2008-02-26 14:52:08 ]|
The general structure to run multiple find & replace operations in a macro would be this:
If you want to use normal Find & Replace (eg: not regular expressions / PowerFind) then the options string is simply 'a' to specify replace all, eg:
If you want to use PowerFind then you'll want to add an 'e', or a capital 'E' for PowerFind Pro, eg:
|Author:||mwiseman [ 2008-02-26 15:10:40 ]|
So I just use simple statements according to the models you provided? No Document Declarations (as if I even know what that is) or the anything like Microsoft.Sucks.End.With?
That's almost too easy.
You're saying I could make a simple spreadsheet of the few dozen things I want to correct, write a formula to format those items into text that I save as a macro and Bob's my uncle?
|Author:||Matze [ 2008-09-02 08:34:46 ]|
|Post subject:||Re: Find/Replace multiple items|
It was easier even: In Nisus Writer Classic you just macroized your Find/Replace String with a "macroize" button in the lower left corner of the F/R Window.
By the way: will Nisus Writer Pro have such a feature some day?
|Author:||martin [ 2008-09-02 14:50:05 ]|
That's exactly right. There's really only one thing that I can think of that would make things more complicated for you: searching for an apostrophe or backslash. You have to "escape" the characters. So, if you wanted to replace the word "it's" you'd precede the apostrophe with a single backslash, eg:
Same thing for backslashes themselves, eg:
It should indeed- we're looking to add that feature in sometime soon.
|Page 1 of 1||All times are UTC - 8 hours|
|Powered by phpBB® Forum Software © phpBB Group