Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / June 2005

Tip: Looking for answers? Try searching our database.

VBA macro for finding extended/special characters/symbols

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Charlie''s odd VBA questions - 27 Jun 2005 19:46 GMT
I have written a macro to find symbols and extended characters in a Word
document.  However, if a symbol is inserted, it's character code is Asc(40 or
Asc(63) as documented by MS.  Word lists it as the normal text font such as
Arial even though the symbol is actually, saym Webdings.  I can find it by
Find.Text = (unicode).  However, even though I can find and select it, I can
not determine what the actual font of the symbol is.  Since I need to copy
the symbol character, I need to know the real font name.  How can I get the
real font name?

Also, is there any property or method to return the actual number of
occurrences changed when doing a Find.Replace using Continue and ReplaceAll?  
Word shows it in the status bar, but I need to be able to return this count
to the macro.

Any help or suggestions would be really appreciated.
Jay Freedman - 27 Jun 2005 21:34 GMT
> I have written a macro to find symbols and extended characters in a
> Word document.  However, if a symbol is inserted, it's character code
[quoted text clipped - 12 lines]
>
> Any help or suggestions would be really appreciated.

Have a look at http://word.mvps.org/FAQs/MacrosVBA/FindReplaceSymbols.htm.

Signature

Regards,
Jay Freedman
Microsoft Word MVP          FAQ: http://word.mvps.org

Klaus Linke - 28 Jun 2005 00:42 GMT
Hi Charlie,

Probably the article Jay mentioned will answer your immediate question: If you select the character and open "Insert > Symbol", it should tell you the font.

You can also use the macro from the thread http://groups-beta.google.com/group/microsoft.public.word.vba.customization/brow
se_frm/thread/4ff56641a0175fb/43be18bf4c8700ed

to turn the symbols into regular characters that you can find/replace. They'll have codes in the Unicode block U+F000.

The macro fails in some rare cases. One such case is when a doc had symbol fields and was saved in RTF format: The symbol fields are turned into symbols, but they don't act as they should.
I haven't found a solution for those cases yet.

Regards,
Klaus



>> I have written a macro to find symbols and extended characters in a
>> Word document.  However, if a symbol is inserted, it's character code
[quoted text clipped - 14 lines]
>
> Have a look at http://word.mvps.org/FAQs/MacrosVBA/FindReplaceSymbols.htm.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.