Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
What is required to find two words please
[A-Za-z]@-[A-Za-z]@ will find CULLEN-SONET What is required to find the below examples please. DCASH-SKAI GLORY GOLD BROSE-MOLINEUX WOODBURY LAD-FASHION COURT VOLKSRAAD-WALKIN ON SUNSH Thankyou |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
What is required to find two words please
You can find the hyphenated words, but random phrases are impossible to
find - unless they are all known beforehand and you use an array eg. Sub ReplaceList() Dim vFindText As Variant Dim vReplText As Variant Dim i As Long vFindText = Array("DCASH-SKAI GLORY", "GOLD BROSE-MOLINEUX", _ "WOODBURY LAD-FASHION COURT", "VOLKSRAAD-WALKIN ON SUNSH") vReplText = Array("WORD1", "WORD2", "WORD3", "WORD4") With Selection.Find .Forward = True .Wrap = wdFindContinue .MatchWholeWord = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False .Format = True .MatchCase = True For i = LBound(vFindText) To UBound(vFindText) .Text = vFindText(i) .Replacement.Text = vReplText(i) .Execute replace:=wdReplaceAll Next i End With End Sub Steved wrote: [A-Za-z]@-[A-Za-z]@ will find CULLEN-SONET What is required to find the below examples please. DCASH-SKAI GLORY GOLD BROSE-MOLINEUX WOODBURY LAD-FASHION COURT VOLKSRAAD-WALKIN ON SUNSH Thankyou |
#3
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
What is required to find two words please
Hello Graham from Steved
Thankyou "Graham Mayor" wrote: You can find the hyphenated words, but random phrases are impossible to find - unless they are all known beforehand and you use an array eg. Sub ReplaceList() Dim vFindText As Variant Dim vReplText As Variant Dim i As Long vFindText = Array("DCASH-SKAI GLORY", "GOLD BROSE-MOLINEUX", _ "WOODBURY LAD-FASHION COURT", "VOLKSRAAD-WALKIN ON SUNSH") vReplText = Array("WORD1", "WORD2", "WORD3", "WORD4") With Selection.Find .Forward = True .Wrap = wdFindContinue .MatchWholeWord = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False .Format = True .MatchCase = True For i = LBound(vFindText) To UBound(vFindText) .Text = vFindText(i) .Replacement.Text = vReplText(i) .Execute replace:=wdReplaceAll Next i End With End Sub Steved wrote: [A-Za-z]@-[A-Za-z]@ will find CULLEN-SONET What is required to find the below examples please. DCASH-SKAI GLORY GOLD BROSE-MOLINEUX WOODBURY LAD-FASHION COURT VOLKSRAAD-WALKIN ON SUNSH Thankyou |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Find multiple words | Microsoft Word Help | |||
How do I build a word list with number of occurrences of each wor. | Microsoft Word Help | |||
redundant words | Microsoft Word Help | |||
How many times are words used in a document. | Microsoft Word Help | |||
I am looking for Word's TOC and TOA Generator, where will I find t | Microsoft Word Help |