View Single Post
 
Old 12-08-2015, 02:56 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

You could use something like:
Code:
Sub Demo()
Application.ScreenUpdating = False
Dim StrFnd As String, StrOut As String
StrFnd = ChrW(&H3AC) & "-" & ChrW(&H3AF) & ChrW(&H3B1) & ChrW(&H3B5) & _
  ChrW(&H3B7) & ChrW(&H3B9) & ChrW(&H3BF) & ChrW(&H3C5) & ChrW(&H3C9) & _
  ChrW(&H3CC) & "-" & ChrW(&H3CE) & ChrW(&H1F00) & "-" & ChrW(&H1F07) & _
  ChrW(&H1F10) & "-" & ChrW(&H1F15) & ChrW(&H1F20) & "-" & ChrW(&H1F27) & _
  ChrW(&H1F30) & "-" & ChrW(&H1F37) & ChrW(&H1F40) & "-" & ChrW(&H1F45) & _
  ChrW(&H1F50) & "-" & ChrW(&H1F57) & ChrW(&H1F60) & "-" & ChrW(&H1F67) & _
  ChrW(&H1F70) & "-" & ChrW(&H1F87) & ChrW(&H1F90) & "-" & ChrW(&H1F97) & _
  ChrW(&H1FA0) & "-" & ChrW(&H1FA7) & ChrW(&H1FB0) & "-" & ChrW(&H1FB7) & _
  ChrW(&H1FC2) & "-" & ChrW(&H1FC7) & ChrW(&H1FD0) & "-" & ChrW(&H1FD7) & _
  ChrW(&H1FE0) & "-" & ChrW(&H1FE3) & ChrW(&H1FE6) & "-" & ChrW(&H1FE7) & _
  ChrW(&H1FF2) & "-" & ChrW(&H1FF7)
With ActiveDocument.Range
  With .Find
    .ClearFormatting
    .Replacement.ClearFormatting
    .Text = "<[!^13 ]@" & StrFnd & " " & StrFnd & "[! ]@>"
    .Replacement.Text = ""
    .Forward = True
    .Wrap = wdFindStop
    .Format = False
    .MatchWildcards = True
    .Execute
  End With
  Do While .Find.Found
    StrOut = StrOut & vbCr & .Text
    .Collapse wdCollapseEnd
    .Find.Execute
  Loop
End With
ActiveDocument.Range.InsertAfter vbCr & Chr(12) & "Hiatus List" & StrOut
Application.ScreenUpdating = True
End Sub
In this case, all the Greek characters are assigned to the StrFnd variable, so you only need to input them once. Note the corresponding changes to the 'Text = ' statement also.

If you want to see what StrFnd contains, insert:
.InsertAfter StrFnd
before:
With .Find
and run the macro in an empty document.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote