I often copy material I’ve found online to a Word document. (For personal use, of course.) There are zillions of codes online and I find some don’t translate well.
Specifically, some render characters in Word as a replacement glyph:
Word doesn’t want to replace these because it doesn’t even recognize them as characters, not even why copy-and-pasted into the Replace box. The Unicode glyph is a real nuisance.
If there a way to force Word to see these glyphs to get rid of them?
[ol]
[li]Save your Word document as a text (.txt) file[/li][li]Open up the text file in a real text reader (say, Notepab++)[/li][li]Do a search and replace on the unicode character and save the file.[/li][li]Open the text file in Word and save it as .doc or .docx file.[/li][li]Apply formatting to the reconstituted document.[/li][/ol]
Or better still, initially save your online material as a text file, clean out any unicode, then go the Word route.
I also found that the usual tricks of getting special characters in the find/replace box didn’t work for this character. But the limitation is just with the GUI box, not the underlying function, so you can write a Visual Basic macro to do this. I don’t know what version of Word you have or how much you know about macros, so I don’t know whether you need detailed instructions or how to write them. Here’s one way to do it in Word 2007:
[ol]
[li] Start recording a macro (Developer tab > Record Macro). Name it whatever seems appropriate, say “replaceFFFD”. If you want to use this on all of your documents, store it in Normal.dotm; if just on this one, you can store it with the current document.[/li][li] Go to the beginning of the document (ctrl-Home) so that the replace operation will cover the whole document.[/li][li] Open the Replace dialog (ctrl-H) and type something in the Find box, and then click “Replace All”. (If you want to make sure things are working you can use a string that’s in your document.) Click OK on the new dialog and close the Replace dialog.[/li][li] Stop recording (the “Stop Recording” button).[/li][li] Open up the macros for editing (“Macros” button in the Developer tab). Find your macro and click “Edit”. Find the text you typed in the Find box; it should be on a line like[/li]
.Text = "abc"
(with your Find string in quotes). Replace the quoted string with the character you want to delete, giving
.Text = ChrW(65533)
(65533 is the decimal equivalent of the hexadecimal FFFD; there are no quotes).
[li] Run the macro (the green right-pointing “Play” triangle in the VB editor menu bar, or F5). This should get rid of the offending character. (If you like you can bind this macro to a key or button, or you can run it later from the Macros dialog.)[/ol][/li]The whole macro should look something like this:
Sub replFFFD()
'
' replaceFFFD Macro
'
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = ChrW(65533)
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub