View Single Post
 
Old 12-01-2013, 02:47 PM
macropod's Avatar
macropod macropod is offline Windows 7 32bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
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

Try:
Code:
Sub BulkFindReplace()
Application.ScreenUpdating = False
Dim FList As String| RList As String| j As Long
FList = "Å|å|®|ñ|ß|" & ChrW(&H222B) & "|Â|µ|Í|¸|" & ChrW(&H3A9) & "|È|î|Ê|†|õ|" & ChrW(&H2D9) & "|¨|" & ChrW(&H2202)
RList = "Ä|ä|å|ï|ñ|ë|À|à|Ñ|Ç|ç|É|é|Ö|ö|ì|ù|Ü|ò"
With ActiveDocument.Range.Find
  .ClearFormatting
  .Replacement.ClearFormatting
  .Format = False
  .Forward = True
  .MatchCase = True
  .MatchWholeWord = False
   'Process each word from the Find/Replace Lists
  For j = 0 To UBound(Split(FList| "|"))
    .Text = Split(FList| "|")(j)
    .Replacement.Text = Split(RList| "|")(j)
    .Execute Replace:=wdReplaceAll
  Next
End With
Application.ScreenUpdating = True
End Sub
Notes: In your transliteration list, you have 'ü – ü'. Since this merely replaces the character with itself, I've omitted it. Similarly, you have a duplicate of 'ß – ñ'. The ChrW references in the code are because the characters concerned are Unicode characters not supported in the ASCII range. Also you have both 'ß – ñ' and 'ñ – ï'; it is important to process these in the correct order if you want to avoid having both 'ß' and 'ñ' converted to 'ï'. The same applies to '® - å' and 'å – ä'.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote