WildEdit Search/Replace in Word Documents

General questions about using WildEdit

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
chazdk1
Posts: 1
Joined: Thu Aug 19, 2004 3:11 pm

WildEdit Search/Replace in Word Documents

Post by chazdk1 »

I have 55 Word documents that I need to change text in. I am using Microsoft Word 2002. I want to search for a url and replace with a different url.

Search Pattern: support.abc.com/region
Replacement Format: totalchoice.abc.com
Character Encoding: windows-1252
Root folder: W:\New Jurisdictions\testFolder
File Filter: *.doc
Regular Expression: false
Replacement Format: false
Match Case: false
Match Words: false



The search string is found and replaced, but when I try to open the Word document after the replacement has been made I get the following error message: The document name or path is not valid. Try these suggestions. *Check the file permissions for the document or drive. * Use the File Open dialog box to locate the document. (W:\New Jurisdictions\testFolder\test.doc)

The only way to salvage the file is to do an Edit>Undo from WildEdit. What am I doing wrong? :( [/img]
Please help
User avatar
talleyrand
Posts: 624
Joined: Mon Jul 21, 2003 6:56 pm
Location: Kansas City, MO, USA
Contact:

Post by talleyrand »

I suspect the fact that you're altering a binary file with a text editor is the initial issue. I think if it happens to work, you could count yourself lucky. Otherwise, you'll probably need to open each document and use the built in search and replace function (ctrl-H) and then save it.
I choose to fight with a sack of angry cats.
User avatar
bbadmin
Site Admin
Posts: 879
Joined: Mon Feb 17, 2003 8:54 pm
Contact:

Post by bbadmin »

MS Word DOC files contain Unicode strings, but the files are in a proprietary binary format that may preceed each string by its length (for example). WildEdit simply uses regular expressions to replace one string by another, so changing the number of characters would corrupt such files. If you saved the documents in RTF or XML format, you could safely edit them with WildEdit.

Keith MacDonald
Helios Software Solutions
mo
Posts: 306
Joined: Tue Mar 11, 2003 1:40 am

Post by mo »

If this is a big project it might be worth picking up 'Search and Replace' at Funduc Software. They have an add-on which enables it to work with Word.

A feature this should suggest for WE.
Best Wishes!
Mike Olds
Post Reply