View Single Post
 
Old 05-08-2013, 09:45 AM
d4okeefe d4okeefe is offline Windows Vista Office 2010 64bit
Advanced Beginner
 
Join Date: Apr 2013
Posts: 77
d4okeefe is on a distinguished road
Default Identifying Irregular Characters

A few years ago I recorded this macro, which is designed to identify irregular characters in a document.

Code:
With Selection.Find
  .ClearFormatting
  .Replacement.ClearFormatting
  .Text = "[!\!-\],_,a-z,§,¶,\, ,^13,^m,^l,^s,^=,^+,^t,^-,“,”,‘,’,^2]"
  .Replacement.Text = ""
  .Forward = True
  .Wrap = wdFindContinue
  .Format = False
  .MatchCase = False
  .MatchWholeWord = False
  .MatchAllWordForms = False
  .MatchSoundsLike = False
  .MatchWildcards = True
  .Execute
End With
As you can see, the macro ignores most characters. But it stops on ligatures like "fi", grave accents (`), and other things unusual.

It works well for our purposes. However, I would like to improve it in two ways.

First, I would like the macro to first look in the main body of the document for irregular characters, then cycle through the footnotes. Right now, it only cycles through the document part where it begins.

Second, I would like macro to also ignore some other characters like m-spaces ChrW(8195) and n-spaces ChrW(8194). It currently stops on those characters as well.

Any ideas? Thank you for your help.

Last edited by macropod; 05-08-2013 at 03:21 PM. Reason: Added code tags & formatting
Reply With Quote