Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Other Office > Word VBA
|
Word VBA Discuss using VBA to program Word.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Word VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 16th, 2010, 05:02 AM
Registered User
 
Join Date: May 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Detecting if a character is a symbol

We wish to detect if a selected character in a Word document is a Symbol. If you use the insert symbol menu to put in, say, a greek mu then select the character, the VBA code

asc(selection.range.text) returns the value 40

and the VBA code

selection.range.font.name returns "Times new Roman" if the surrounding text uses TImes New Roman

Asc 40 in TImes new Roman is the character (

Therefore we are unable to detect programmatically that one of the characters is a greek mu but one of the characters is a (

Any suggestions?
 
Old September 16th, 2010, 08:35 AM
Friend of Wrox
 
Join Date: Sep 2005
Posts: 812
Thanks: 1
Thanked 53 Times in 49 Posts
Default

Hi

Can you try typing Alt + 0181 and check if the symbol is the same

Cheers
Shasur
__________________
C# Code Snippets (http://www.dotnetdud.blogspot.com)

VBA Tips & Tricks (http://www.vbadud.blogspot.com)





Similar Threads
Thread Thread Starter Forum Replies Last Post
Replacing value with symbol in Gridview? kingroon ASP.NET 2.0 Basics 2 July 7th, 2008 09:46 AM
pound symbol in XSL Velissarios XSLT 15 January 19th, 2006 02:16 PM
dual use of the + symbol Martyn JSP Basics 0 February 19th, 2004 07:35 AM
Error-cannot resolve symbol Rusk JSP Basics 1 February 18th, 2004 09:20 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.