1
두 개 이상의 공백이있는 마침표를 찾을 수있는 다음 스크립트를 가지고 있지만 찾고있는 것은 첫 번째 단어를 찾을 수 있도록하는 것입니다. 문장이 "의학적"이라면 그것을 바꿀 것입니다. 나는이 대본을 활용하기를 바랬지 만 이미 놓친 단락의 첫 번째 단어인지 여부는 이미 알 수 있습니다. "의학"에 대한 검색 방법을 잘 모르겠습니다.단어의 문장 첫 번째 단어를 검색하는 방법
With Selection.Find
.ClearFormatting
.Highlight = False
.Replacement.ClearFormatting
.Replacement.Highlight = True
.Text = (\.)({2,9})
.Replacement.Text = "\1 "
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchWildcards = True
.Execute Replace:=wdReplaceAll
End With
나는 link 또 다른 게시물을 찾아 결국이 함께했다 :
Dim i As Integer
Dim doc As Document
Set doc = ActiveDocument
For i = 1 To doc.Sentences.Count
If doc.Sentences(i).Words(1) = "Medical " Then
doc.Sentences(i).Words(1) = "Medical (needs removal) "
End If
If doc.Sentences(i).Words(1) = "Dental " Then
doc.Sentences(i).Words(1) = "Dental (needs removal) "
End If
If doc.Sentences(i).Words(1) = "Life " Then
doc.Sentences(i).Words(1) = "Life (needs removal) "
End If
If doc.Sentences(i).Words(1) = "Vision " Then
doc.Sentences(i).Words(1) = "Vision (needs removal) "
End If
Next
답장을 보내 주셔서 감사합니다. – MBlackburn
이 게시물을 보시겠습니까? [link] (http://stackoverflow.com/questions/10711764/vba-word-find-hyperlinks-if-not-arial-10pt-blue) – MBlackburn