Ana içeriğe atla

Birden çok dosyada kelimede nasıl arama yapılır ve değiştirilir?

Aynı içeriği (üstbilgi, altbilgi, bazı özel sözcükler veya sayılar gibi) içeren birkaç düzine sözcük dosyanız varsa ve bu belgelerde aynı içeriği Word'de değiştirmeniz gerekir. Hızlı bir şekilde halletmeniz sizin için ne kadar kolay olurdu? Kesinlikle, aynı içeriği değiştirmek için bu dosyaları tek tek açabilirsiniz, ancak bu zaman alıcı ve zahmetli olacaktır. Bu eğitim, size aynı içeriği Word'deki birden çok belgede aynı anda değiştirmenin zor bir yolunu gösterecektir.

VBA kodu ile aynı anda birden çok kelime belgesinde metinleri bulun ve değiştirin
Kutools for Word ile aynı anda birden fazla belgede farklı metinleri kolayca bulun ve değiştirin


VBA kodu ile aynı anda birden çok kelime belgesinde metinleri bulun ve değiştirin

1. Basın Ara Toplam + F11 açmak için Uygulamalar için Microsoft Visual Basic pencere.

2. içinde Uygulamalar için Microsoft Visual Basic Pencere, tıklayın Eklemodül, ardından aşağıdaki VBA kodunu Modül penceresine kopyalayın.

VBA Kodu: Bir seferde birden çok belgede aynı içeriği arama ve değiştirme

Sub CommandButton1_Click()
'Updated by Extendoffice 20180625
Dim xFileDialog As FileDialog, GetStr(1 To 100) As String '100 files is the maximum applying this code
Dim xFindStr As String
Dim xReplaceStr As String
Dim xDoc As Document
On Error Resume Next
Set xFileDialog = Application.FileDialog(msoFileDialogFilePicker)
With xFileDialog
    .Filters.Clear
    .Filters.Add "All WORD File ", "*.docx", 1
    .AllowMultiSelect = True
    i = 1
    If .Show = -1 Then
        For Each stiSelectedItem In .SelectedItems
            GetStr(i) = stiSelectedItem
            i = i + 1
        Next
        i = i - 1
    End If
    Application.ScreenUpdating = False
    xFindStr = InputBox("Find what:", "Kutools for Word", xFindStr)
    xReplaceStr = InputBox("Replace with:", "Kutools for Word", xReplaceStr)
    For j = 1 To i Step 1
        Set xDoc = Documents.Open(FileName:=GetStr(j), Visible:=True)
        Windows(GetStr(j)).Activate
        Selection.Find.ClearFormatting
        Selection.Find.Replacement.ClearFormatting
        With Selection.Find
            .Text = xFindStr  'Find What
            .Replacement.Text = xReplaceStr  'Replace With
            .Forward = True
            .Wrap = wdFindAsk
            .Format = False
            .MatchCase = False
            .MatchWholeWord = False
            .MatchByte = True
            .MatchWildcards = False
            .MatchSoundsLike = False
            .MatchAllWordForms = False
        End With
        Selection.Find.Execute Replace:=wdReplaceAll
        Application.Run macroname:="NEWMACROS"
        ActiveDocument.Save
        ActiveWindow.Close
    Next
    Application.ScreenUpdating = True
End With
MsgBox "Operation end, please view", vbInformation
End Sub

3. Tuşuna basın. F5 kodu çalıştırmak için anahtar.

4. Açılışta Araştır penceresi, lütfen içinde bulacağınız ve değiştireceğiniz belgeleri bulup seçin ve ardından OK buton. Ekran görüntüsüne bakın:

5. İlkinde Kutools for Word iletişim kutusunda, belgeler arasında bulacağınız metni Ne bul ve ardından OK düğmesine basın.

6. saniyede Kutools for Word iletişim kutusunda, değiştireceğiniz metni girin ve OK düğmesine basın.

8. Tıklayın OK sonraki düğme Microsoft Word Bul ve değiştir işlemini bitirmek için iletişim kutusu.

Bu durumda, seçilen belgelerdeki tüm "Word" sözcükleri aynı anda "Excel" ile değiştirilir.


Kutools for Word ile aynı anda birden fazla belgede farklı metinleri kolayca bulun ve değiştirin

İşte kesinlikle tavsiye ederim Toplu Bul ve Değiştir özelliği Kutools for Word. Bu özellikle, farklı metinleri birden çok Word belgesinde aynı anda kolayca bulabilir ve değiştirebilirsiniz. Belgeler arasında metin bulmak ve değiştirmek için bu özelliği nasıl uygulayacağımızı görelim.

Kutools for Word : 100'den fazla kullanışlı Word eklentisiyle, herhangi bir sınırlama olmaksızın denemek için ücretsiz 60 Gün.

1. Lütfen tıklayın Kutools Artı > Toplu Bul ve Değiştir özelliği etkinleştirmek için.

2. içinde Toplu Bul ve Değiştir iletişim kutusu, lütfen aşağıdaki gibi yapılandırın.

  • 2.1) satır ekle düğmesi altında Bul ve Değiştir sekme;
  • 2.2) Oluşturulan satır alanlarında:
A. Bulacağınız metni aşağıdaki metin kutusuna girin. bulmak sütun
B. Değiştireceğiniz metni metin kutusuna girin. değiştirmek sütun;
C. Bir arama türü, metnin nerede bulunacağını ve metni istediğiniz gibi vurgulamak için bir renk belirtin. Bu durumda seçiyorum Tam kelime eşleme, Ana belge ve belli bir renk Arama Tipi, Bulmak ve Vurgulamak sütun;
  • 2.3) Bulacağınız ve değiştireceğiniz daha fazla metin eklemek için 2.1 ve 2.2 adımlarını tekrarlayın;
  • 2.4)  düğmesi Dosya tipi metinleri bulup değiştireceğiniz Word belgelerini eklemek için bölüm;
  • 2.5) değiştirmek or bulmak buton. Ekran görüntüsüne bakın:

notlar:
1. Tıklarsanız bulmak düğmesinin altında tüm bulgu sonuçları görüntülenecektir. Sonucu Önizle sekmesi. Sonuçların önizlemesini yaptıktan sonra, tüm metinleri değiştirmek isterseniz, lütfen Bul ve Değiştir sekmesi. Aksi takdirde, iletişim kutusunu kapatın.

2. Tıklarsanız değiştirmek düğmesi, belirtilen tüm metinler hemen yenileriyle değiştirilecek ve sonuçlar ayrıca Sonucu Önizle sekmesi.

3. 2. adımda vurgu renkleri belirtirseniz, değiştirilen tüm metinler belirtilen renklerle vurgulanır ve bunları belgelerde bir bakışta kolayca bulabilirsiniz.

3. Kapat Toplu Bul ve Değiştir iletişim kutusu

Bu özellik hakkında daha fazla bilgi için lütfen buraya tıklayın ....

Bu yardımcı programı ücretsiz olarak denemek istiyorsanız, lütfen şu adrese gidin: yazılımı ücretsiz indirin önce ve sonra yukarıdaki adımlara göre işlemi uygulamaya gidin.

En İyi Ofis Üretkenlik Araçları

Kutools for Word - Over ile Kelime Deneyiminizi Yükseltin 100 Dikkat Çekici Özellikler!

🤖 Kutools Yapay Zeka Asistanı: Yazılarınızı AI ile dönüştürün - İçerik Oluştur  /  Metni Yeniden Yaz  /  Belgeleri Özetleyin  /  Bilgi İçin Arayın Belgeye dayalı, hepsi Word'de

📘 Belge Ustalığı: Sayfaları Böl  /  Belgeleri Birleştir  /  Seçimi Çeşitli Formatlarda Dışa Aktar (PDF/TXT/DOC/HTML...)  /  PDF'ye Toplu Dönüştürme  /  Sayfaları Görüntü Olarak Dışa Aktar  /  Aynı Anda Birden Çok Dosyayı Yazdırma...

İçerik Düzenleme: Toplu Bul ve Değiştir Birden Çok Dosyada  /  Tüm Resimleri Yeniden Boyutlandır  /  Tablo Satırlarını ve Sütunlarını Yer Değiştirme  /  Tabloyu Metne Dönüştür...

🧹 Zahmetsiz Temizlik: Uzaklaşın Ekstra Alanlar  /  Bölüm Sonları  /  Tüm Başlıklar  /  Metin kutuları  /  Köprüler  / Daha fazla sökme aleti için sayfamıza gidin Grubu Kaldır...

Yaratıcı Ekler: Ekle Bin Ayırıcı  /  Onay Kutuları  /  Radyo Düğmeleri  /  QR Code  /  Barkod  /  Çapraz Çizgi Tablosu  /  Denklem Başlığı  /  Görüntü Başlık  /  Tablo başlığı  /  Çoklu Resimler  / Daha fazlasını şurada keşfedin: Grup Ekle...

🔍 Hassas Seçimler: Nokta tespiti belirli sayfalar  /  tablolar  /  şekiller  /  başlık paragrafları  / Gezinmeyi şununla geliştirin: Daha Özellikleri seçin...

Yıldız Geliştirmeleri: Herhangi bir konuma hızla gidin  /  tekrarlanan metni otomatik olarak ekle  /  belge pencereleri arasında sorunsuzca geçiş yapın  /  11 Dönüşüm Aracı...

👉 Bu özellikleri denemek ister misiniz? Kutools for Word şunları sunar: 60 günlük ücretsiz deneme, hiçbir sınırlama olmaksızın! ????
 
Comments (70)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
thanks for -How To Search And Replace Across Multiple Files In Word?

what about from out side (by folder) ?

thanks gain
This comment was minimized by the moderator on the site
This is a great explanation.  Is there a way to change settings, e.g. page size, simultaneously? 
This comment was minimized by the moderator on the site
After pressing F5, I get the following error" "Compile error: User-defined type not defined." Can someone help?
This comment was minimized by the moderator on the site
Hi Monique,Please check if the Microsoft Office Object Library is enabled as shown in the screenshot below.
This comment was minimized by the moderator on the site
This is SUCH a time saving solution. THANK YOU!
One thing that may make it even better, is adding support for subdirectories. (That is: Files in multiple subdirectories)
I am an absolute newbie in this, and don't know the syntax, the parameter, or where to add that.

Could somebody help?
This comment was minimized by the moderator on the site
I need to replace text in multiple Word files and have the replaced text highlighted. Is there a way to do this?
This comment was minimized by the moderator on the site
Hi Daphne,
Why not try the Batch Find and Replace feature of Kutools for Word? It can solve this issue with ease.
This comment was minimized by the moderator on the site
this was a lifesaver thank you so much
This comment was minimized by the moderator on the site
Is it possible to replace in the headers of the word doc?
This comment was minimized by the moderator on the site
Hi Tiago,
Please apply the below VBA code to include the content of headers and footers when finding and replacing texts in multiple documents at once.

Sub CommandButton1_Click()
'Updated by Extendoffice 20180625
Dim xFileDialog As FileDialog, GetStr(1 To 100) As String '100 files is the maximum applying this code
Dim xFindStr As String
Dim xReplaceStr As String
Dim xDoc As Document
On Error Resume Next
Set xFileDialog = Application.FileDialog(msoFileDialogFilePicker)
With xFileDialog
.Filters.Clear
.Filters.Add "All WORD File ", "*.docx", 1
.AllowMultiSelect = True
i = 1
If .Show = -1 Then
For Each stiSelectedItem In .SelectedItems
GetStr(i) = stiSelectedItem
i = i + 1
Next
i = i - 1
End If
Application.ScreenUpdating = False
xFindStr = InputBox("Find what:", "Kutools for Word", xFindStr)
xReplaceStr = InputBox("Replace with:", "Kutools for Word", xReplaceStr)
For j = 1 To i Step 1
Set xDoc = Documents.Open(FileName:=GetStr(j), Visible:=True)
Windows(GetStr(j)).Activate
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = xFindStr 'Find What
.Replacement.Text = xReplaceStr 'Replace With
.Forward = True
.Wrap = wdFindAsk
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchByte = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Application.Run macroname:="NEWMACROS"
If MsgBox("Do you want to replace texts in headers and footers too? ", vbYesNo, "Kutools for Word") = vbYes Then
ActiveWindow.View.SplitSpecial = wdPanePrimaryFooter
Selection.Find.Execute Replace:=wdReplaceAll
Application.Run macroname:="NEWMACROS"
ActiveWindow.View.SplitSpecial = wdPanePrimaryHeader
Selection.Find.Execute Replace:=wdReplaceAll
Application.Run macroname:="NEWMACROS"
End If
ActiveDocument.Save
ActiveWindow.Close
Next
Application.ScreenUpdating = True
End With
MsgBox "Operation end, please view", vbInformation
End Sub
This comment was minimized by the moderator on the site
Is that possible to replace in the header of the word doc?
This comment was minimized by the moderator on the site
Thanks for sharing this information with us.
Word search and replace tool
This comment was minimized by the moderator on the site
Works perfectly but is there a similar macro to change text in the header! because this does not work with this version!
thanks
This comment was minimized by the moderator on the site
Hi,
Please apply the below VBA code to include the content of headers and footers when finding and replacing texts in multiple documents at once.

Sub CommandButton1_Click()
'Updated by Extendoffice 20180625
Dim xFileDialog As FileDialog, GetStr(1 To 100) As String '100 files is the maximum applying this code
Dim xFindStr As String
Dim xReplaceStr As String
Dim xDoc As Document
On Error Resume Next
Set xFileDialog = Application.FileDialog(msoFileDialogFilePicker)
With xFileDialog
.Filters.Clear
.Filters.Add "All WORD File ", "*.docx", 1
.AllowMultiSelect = True
i = 1
If .Show = -1 Then
For Each stiSelectedItem In .SelectedItems
GetStr(i) = stiSelectedItem
i = i + 1
Next
i = i - 1
End If
Application.ScreenUpdating = False
xFindStr = InputBox("Find what:", "Kutools for Word", xFindStr)
xReplaceStr = InputBox("Replace with:", "Kutools for Word", xReplaceStr)
For j = 1 To i Step 1
Set xDoc = Documents.Open(FileName:=GetStr(j), Visible:=True)
Windows(GetStr(j)).Activate
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = xFindStr 'Find What
.Replacement.Text = xReplaceStr 'Replace With
.Forward = True
.Wrap = wdFindAsk
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchByte = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Application.Run macroname:="NEWMACROS"
If MsgBox("Do you want to replace texts in headers and footers too? ", vbYesNo, "Kutools for Word") = vbYes Then
ActiveWindow.View.SplitSpecial = wdPanePrimaryFooter
Selection.Find.Execute Replace:=wdReplaceAll
Application.Run macroname:="NEWMACROS"
ActiveWindow.View.SplitSpecial = wdPanePrimaryHeader
Selection.Find.Execute Replace:=wdReplaceAll
Application.Run macroname:="NEWMACROS"
End If
ActiveDocument.Save
ActiveWindow.Close
Next
Application.ScreenUpdating = True
End With
MsgBox "Operation end, please view", vbInformation
End Sub
This comment was minimized by the moderator on the site
Oh yeah! Thank you sooooo much! This is a life-saver!
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations