Strip Unicode characters

C

Charlie Mac

VBA Gerus,

I am trying to scan documents for text, but documents containing
unicode characters are crashing my scanner routine. I can verify that
Unicode characters exist with this routine:

Sub UnicodeCheck() ' Check document for Unicode characters
Dim rs As Variant '
On Error GoTo ErrorManager
For Each rs In Documents(1).ReadabilityStatistics
Next rs
MsgBox "No Unicode characters found in document"
Exit Sub
ErrorManager:
' Err.Number = 4658 means Unicode characters were found
MsgBox "Unicode characters in document - error code: " &
Err.Number
End Sub

I have experimented with:

Selection.WholeStory
Selection.Find.ClearFormatting
Selection.Find.ClearAllFuzzyOptions
Selection.Find.ClearHitHighlight

to no avail.


What I think I need is a Unicode stripper routine. How do I strip out
characters < FF00 and characters > FF60 ? Thanks in advance.

Texas Charlie
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top