Re: search/replace on multiple files?
From: John McGhie (john_at_mcghie.name)
Date: 01/02/05
- Next message: Scubadoc: "Re: Problems with Office 2004 pro"
- Previous message: Andrew: "Re: Mail Merge using excel"
- In reply to: Bill Weylock: "Re: search/replace on multiple files?"
- Next in thread: montagnana_at_earthlink.net: "Re: search/replace on multiple files?"
- Reply: montagnana_at_earthlink.net: "Re: search/replace on multiple files?"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 03 Jan 2005 09:27:32 +1100
Great pick-up, Bill :-)
I wish to point out that "All open documents" is a brand-new Macintosh only
feature of Word :-)
Others have referred you to the Wildcards find/replace. This is not "quite"
what a Unix pilot would describe as "regex" but it's close enough. You have
a maximum of nine levels of nesting within your expression, and I think it's
three pending operations within a statement.
I've never found I need any more. The problem with this sort of thing in
normal documents is that the variability of the content in the documents is
such that really hairy-chested regex find/replaces are simply not safe!
(Unless I wrote the documents, of course: then I know they will be totally
consistent... Not!)
Given the complexity of the syntax and the fact that I have to look it all
up every time I use it, I tend to record the syntax into a VBA Macro every
time I get it right. This is pretty simple: When you get one to work
correctly: turn on the macro recorder and then perform a Replace. It will
record the entire contents of the Find and Replace dialogs into the code for
you, so you have it stored for all time, and you can edit it as required.
Cheers
On 3/1/05 4:34 AM, in article BDFD7094.20A63%bill@nospam.net, "Bill Weylock"
<bill@nospam.net> wrote:
> News is better than you would expect (based on reading your endnotes thread).
> :) In fact, Word does a great job of this.
>
> You do have to have all the documents open.
>
> When you see the Replace dialog, click on the little blue arrow button to the
> left of the entry fields. That will give you the rest of the utility (which
> should be exposed as a default of course). Instead of the usual Current
> Document All, select łAll Open Documents.˛
>
> Works well and fast for me, although my documents do you have your length.
>
> You might want to check out a very inexpensive and gorgeously tended shareware
> text editor called Tex-Edit Plus. It will do normal expression searching.
>
>
> Best,
>
>
> - Bill
>
>
> On 1/2/05 4:50 AM, in article u6SBd.66145$Jk5.52836@lakeread01, "Ronald
> Florence" <ron@18james.com> wrote:
>
>> How do I do search/replace operations on multiple Word files, preferably
>> with both literal and regular expressions. As a simple example, how
>> would I replace "Zikhron" with "Zichron" in all the chapters of a ms.
>> I'm used to using grep, sed, awk, and/or perl for operations on multiple
>> files, but they only work with ascii files.
>>
>> I'm using Word-2004. Thanks,
>
>
>
>
> Panther 10.3.6
> Office 2004
> Windows XP Pro SP2
> Office 2003
>
>
-- Please reply to the newsgroup to maintain the thread. Please do not email me unless I ask you to. John McGhie <john@mcghie.name> Consultant Technical Writer Sydney, Australia +61 4 1209 1410
- Next message: Scubadoc: "Re: Problems with Office 2004 pro"
- Previous message: Andrew: "Re: Mail Merge using excel"
- In reply to: Bill Weylock: "Re: search/replace on multiple files?"
- Next in thread: montagnana_at_earthlink.net: "Re: search/replace on multiple files?"
- Reply: montagnana_at_earthlink.net: "Re: search/replace on multiple files?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|