![]() |
|
|
|
#1
|
||||
|
||||
|
Hi alysolyman, Is this just a couple of words that need replacing in each file, or a large list?
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
#2
|
|||
|
|||
|
This may work for you:
http://gregmaxey.com/word_tip_pages/...d_replace.html |
|
#3
|
|||
|
|||
|
If it is a simple replace over a number of files, using DIR would be the simplest way to go.
|
|
#4
|
||||
|
||||
|
Hir Gerry,
I'm sure you realize it's a little more complicated than that ... I suspect Greg's Addin uses the Dir command for the batch processing option.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
#5
|
|||
|
|||
|
Hi Paul. I am sure Greg's addin does use DIR. It is a very useful tool.
My point was that if it is a simple (say a single word or phrase) operation, then it actually is NOT all that complicated. Code:
Sub ChangeSomething()
Dim file
Dim path As String
Dim r As Range
path = "c:\ThisOne\"
file = Dir(path & "*.doc")
Do While file <> ""
Documents.Open path & file
Set r = ActiveDocument.Range
r.Find.Execute FindText:="this phrase", _
ReplaceWith:="booga booga whatever", Replace:=wdReplaceAll
ActiveDocument.Save
ActiveDocument.Close
file = Dir()
Loop
End Sub
The OP asked: "is there any way to replace some text in multiple files at one time with a new text" The answer of course is, yes. |
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Mass editing of hyperlinks | Michael137 | PowerPoint | 0 | 10-29-2012 02:44 AM |
Prevent OOO reply when sending a mass email
|
tdmag62 | Outlook | 1 | 11-30-2011 09:27 PM |
Word replacing problem!!!!
|
Jamal NUMAN | Word | 2 | 07-08-2011 03:56 AM |
Mass e-mail seperation
|
daryl | Mail Merge | 1 | 03-23-2010 03:45 PM |
Mass attachment downloads?
|
dpool2002 | Outlook | 1 | 06-21-2006 02:11 PM |