메인 컨텐츠로 가기

Word 문서에서 동시에 여러 단어를 찾고 바꾸는 방법은 무엇입니까?

Word는 단어 또는 구의 모든 인스턴스를 찾고 동시에 새 단어로 바꿀 수있는 찾기 및 바꾸기 기능을 제공합니다. 그러나 동시에 다른 단어를 찾아 바꾸고 싶다면이 내장 기능이 도움이되지 않습니다. 이 기사에서는 Word 문서에서 동시에 여러 개의 다른 단어를 찾아서 바꾸는 VBA 방법에 대해 설명합니다.

VBA 코드로 Word에서 동시에 여러 단어 찾기 및 바꾸기
놀라운 기능으로 Word에서 동시에 여러 단어를 쉽게 찾고 바꿉니다.


VBA 코드로 Word에서 동시에 여러 단어 찾기 및 바꾸기

Word 문서에서 동시에 여러 단어를 찾아서 바꾸려면 다음과 같이하십시오.

1. 찾으려는 Word 문서를 열고 동시에 여러 단어를 바꾼 다음 다른 + F11 키를 눌러 응용 프로그램 용 Microsoft Visual Basic 창.

2. 에서 응용 프로그램 용 Microsoft Visual Basic 창을 클릭합니다 끼워 넣다 > 기준 치수. 그런 다음 VBA 코드 아래를 모듈 창에 복사하십시오.

VBA 코드 : Word에서 동시에 여러 단어 찾기 및 바꾸기

Sub FindAndReplaceMultiItems()
'Update by ExtendOffice 2018/10/25
    Dim xFind As String
    Dim xReplace As String
    Dim xFindArr, xReplaceArr
    Dim I As Long
    Application.ScreenUpdating = False
    xFind = InputBox("Enter items to be found here,seperated by comma: ", "Kutools for Word")
    xReplace = InputBox("Enter new items here, seperated by comma: ", "Kutools for Word")
    xFindArr = Split(xFind, ",")
    xReplaceArr = Split(xReplace, ",")
    If UBound(xFindArr) <> UBound(xReplaceArr) Then
        MsgBox "Find and replace characters must be equal.", vbInformation, "Kutools for Word"
        Exit Sub
    End If
    For I = 0 To UBound(xFindArr)
        Selection.HomeKey Unit:=wdStory
        With Selection.Find
            .ClearFormatting
            .Replacement.ClearFormatting
            .Text = xFindArr(I)
            .Replacement.Text = xReplaceArr(I)
            .Format = False
            .MatchWholeWord = False
        End With
        Selection.Find.Execute Replace:=wdReplaceAll
    Next
    Application.ScreenUpdating = True
End Sub

3. 누르세요 F5 코드를 실행하는 키입니다.

4. 첫 번째 Word 용 Kutools 대화 상자에서 찾을 여러 단어를 텍스트 상자에 입력하고 쉼표로 구분 한 다음 OK 단추. 스크린 샷보기 :

5. 두 번째 Word 용 Kutools 대화 상자에서 바꿀 새 단어를 입력 한 다음 (이 단어도 쉼표로 구분해야 함) OK 버튼을 클릭합니다.

참고 : 이 경우 모든 "KTE" 이 문서에서 "새로운",“케이토”"KTW" 다음으로 대체 될 "테스트""끝". 필요에 따라 변경하십시오.


놀라운 기능으로 Word에서 동시에 여러 단어를 쉽게 찾고 바꿉니다.

  일괄 찾기 및 바꾸기 특징 Word 용 Kutools 한 문서 또는 여러 문서에서 동시에 다른 텍스트를 쉽게 찾고 바꿀 수 있습니다.

이 기능을 적용하기 전에 잠시 시간을내어 먼저 다운로드하여 설치하십시오..

1. Microsoft Word 응용 프로그램을 시작하고 쿠툴즈 플러스 > 일괄 찾기 및 바꾸기.

2. 에서 일괄 찾기 및 바꾸기 창에서 다음과 같이 구성하십시오.

  • 2.1 클릭 버튼> 파일을 추가 or 폴더 추가 여러 단어를 찾아서 바꿀 하나 이상의 문서를 추가합니다.
  • 2.2 행 추가 버튼을 클릭하여 찾기 및 바꾸기 필드를 삽입합니다. XNUMX 개의 다른 텍스트를 동시에 찾고 바꾸려면 XNUMX 개의 행을 만드십시오.
  • 2.3 각 행에 새 단어로 바꿀 기존 단어를 입력하십시오. Find 열에 새 단어를 입력 한 다음 교체 열입니다.
  • 2.4 지정 검색 유형 각 행에 대해.
  • 2.5에서 에서 찾기 열에서 찾기 및 바꾸기를 적용 할 위치를 선택합니다. 그것은 포함합니다 주요 문서, 헤더바닥 글 이 섹션의. 필요에 따라 그중 하나, 둘 중 하나 또는 모두를 선택할 수 있습니다.
  • 2.6. 을 클릭합니다 교체 버튼을 눌러 작업을 시작합니다. 스크린 샷보기 :

그런 다음 선택한 문서에서 특정 단어가 동시에 바뀝니다.

팁 : 특정 색상을 지정하여 배경색으로 결과를 강조 할 수 있습니다. 강조 행의 열.

  이 유틸리티의 무료 평가판 (60 일)을 받으려면 그것을 다운로드하려면 클릭하십시오을 클릭 한 다음 위 단계에 따라 작업 적용으로 이동합니다.

최고의 사무 생산성 도구

Word 용 Kutools - Over로 단어 경험을 향상시키세요 100 놀라운 기능!

🤖 Kutools AI 도우미: AI로 글쓰기를 변화시키세요 - 콘텐츠 생성  /  텍스트 다시 쓰기  /  문서 요약  /  정보 문의 문서 기반, 모두 Word 내에서

📘 문서 숙달: 페이지 분할  /  문서 병합  /  다양한 형식으로 선택 항목 내보내기(PDF/TXT/DOC/HTML...)  /  PDF로 일괄 변환  /  페이지를 이미지로 내보내기  /  한 번에 여러 파일 인쇄...

컨텐츠 편집: 일괄 찾기 및 바꾸기 여러 파일에 걸쳐  /  모든 사진 크기 조정  /  테이블 행과 열 바꾸기  /  표를 텍스트로 변환...

🧹 손쉬운 청소: 쓸어버리다 추가 공간  /  섹션 나누기  /  모든 헤더  /  텍스트 상자  /  하이퍼 링크  / 더 많은 제거 도구를 보려면 다음 페이지를 방문하세요. 그룹 제거...

광고 삽입물: 삽입 천 단위 구분 기호  /  확인란  /  라디오 버튼  /  QR 코드  /  바코드  /  대각선 표  /  방정식 캡션  /  이미지 캡션  /  테이블 캡션  /  여러 장의 사진  / 더 자세히 알아보세요. 그룹 삽입...

🔍 정밀한 선택: 핀포인트 특정 페이지  /  테이블  /  모양  /  제목 단락  / 탐색 기능 향상 배우기 기능 선택...

스타 강화: 어떤 위치로든 빠르게 이동  /  반복되는 텍스트 자동 삽입  /  문서 창 간을 원활하게 전환합니다.  /  11 변환 도구...

👉 이러한 기능을 사용해 보고 싶으신가요? Word 용 Kutools는 다음을 제공합니다. 60 일 무료 사용, 제한 없음! 🚀
 
Comments (23)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
The VBA script you provide here seems to work only for Latin characters; is there some workaround to get special characters to work.
I work with Sanskrit, which used the Devanagari script, similar to Hindi. (1) The VBA does not accept the Devanagai font nor does it find the Latin characters with diacriticals. For example: It fails miserably if I search for mūlādhāra (मूलाधार). It doesn't seem to recognize the ū or ā, for example, and the Devanagari is a complete loss.

Moreover, does the script recognize spaces between words? If not, how do I get them in there?

Thank you!
This comment was minimized by the moderator on the site
Chào bạn, có cách nào thay thế RẤT NHIỀU cụm từ bằng RẤT NHIỀU cụm từ khác (nhập từng cụm từ rất mất thời gian) bằng cách m lập một file trong đó có 2 cột, 1 cột là cụm từ nguồn và cột 2 là cụm từ đích được không? rất cám ơn bạn.
This comment was minimized by the moderator on the site
Hi Nguyễn Phúc Lâm,
I recommand you apply the Batch Find and Replace feature of Kutools for Word (the second method in this post) to solve this problem.
In the Find and Replace dialog box, after creating the two columns you need, you can save the current settings as a scenaria for future use.
https://www.extendoffice.com/images/stories/comments/comment-picture-zxm/find_and_replace.png
This comment was minimized by the moderator on the site
Cám ơn Crystal, cách này có thể áp dụng với một số lượng nhỏ các cụm từ, nếu với số lượng các cụm từ lớn (hơn 1000, hơn 10000.. cụm từ) thì rất khó để có thể nhập thủ công. Vậy có cách nào khác không bạn? Cám ơn bạn đã trả lời
This comment was minimized by the moderator on the site
Hi Nguyễn Phúc Lâm,
Temporarily unable to deal with this problem with VBA code as it is a bit complex. This feature will be considered for upgrade in the next release. Sorry for the inconvenience.
This comment was minimized by the moderator on the site
Thanks for the project, Could you make it the way we can also replace letters in words. For example if i want to change Dollar as DoLLar it does not function.
This comment was minimized by the moderator on the site
In the first instruction (Find And Replace Multiple Words At The Same Time In Word With VBA Code), it does not find instances where the word to be replaced falls in the middle of a word (For example, .com following a website name). Can this be modified to do so?
This comment was minimized by the moderator on the site
What if I'm trying to replace commas?
This comment was minimized by the moderator on the site
The VBA code can't help to replace commas. You can apply Kutools to achieve.
This comment was minimized by the moderator on the site
After hitting Replace it just goes to Preview and doesn't do anything further.
This comment was minimized by the moderator on the site
Hi Ajs,All required words have been successfully replaced at once after hitting the Replace button. It goes to the Preview tab to help you know how many words have been successfully replaced. After that, close the dialog box.
This comment was minimized by the moderator on the site
Hi! First, congratulations for your work: this macro is very useful and interesting! I would like, neverthless, you help me with one thing. I am a proofreader and would like the replacements would highlithed in green or red color. How can I do this? Is there a code line I could use?
This comment was minimized by the moderator on the site
Hi, The Batch Find and Replace feature of Kutools for Word can perfectly solve your problem, you can have a try.
This comment was minimized by the moderator on the site
Hi how can this macro be revised to take more key words? I have about 170 words that I wold like to find and replace
This comment was minimized by the moderator on the site
Hi JM,
After running the code, a Kutools for Excel dialog box will pop up, please enter the keywords you will find and separate them with commas.
This comment was minimized by the moderator on the site
How to find and select multiple words at the same time
This comment was minimized by the moderator on the site
Hi,
After running the code, a Kutools for Excel dialog box will pop up, please enter the keywords you will find and separate them with commas.
This comment was minimized by the moderator on the site
Hi, This works well with English Words. Now I am doing a document where I translate English to Gujarati. So, when I apply this, (Find English Words) and (Replace with Gujarati words), it does change but it appears like "???". Doesn't show the Gujarati word but just question marks? Any further help? Please.
This comment was minimized by the moderator on the site
I'm have a similar problem with Sanskrit, not only the Devanagari script but also the English/Latin diacriticals on the special characters like ā, ū, ṛ, ṁ, ṃ, etc. Any suggestions for a workable fix?
This comment was minimized by the moderator on the site
Hello Shailesh, facing the same issue. Did you find a solution to it. Am also trying to figure out how to change from Chinese to English.
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