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 / July 2007

Tip: Looking for answers? Try searching our database.

Symbol Font Character in VBA String variable?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
RPJ - 20 Jul 2007 00:14 GMT
Is it possible in VBA to store a Symbol Font (i.e. Wingdings) character
within a String variable?

For example, would it be possible to replace the "?" character in the code
below with a Windings character  (like no 34 the "simely face")?

   dim A as String
   A = "Some ordinary text here, followed by " & "?"

Any help will be much appreciated.

RPJ
Klaus Linke - 20 Jul 2007 01:39 GMT
> Is it possible in VBA to store a Symbol Font (i.e. Wingdings) character
> within a String variable?
[quoted text clipped - 4 lines]
>    dim A as String
>    A = "Some ordinary text here, followed by " & "?"

No... The character code using the Wingdings (Symbol) font would be &HF000 +
74 = &HF04A = 61514. But there's no way to specify the font in the string
variable.

But the smiley face also is contained in lots of regular fonts such as
Arial, and has the code U+263A.
You'd use A = "some text" & ChrW(&H263A)

It's easiest to avoid symbol fonts as much as possible, or put another way,
to use Unicode whenever possible.

Regards,
Klaus
Russ - 22 Jul 2007 09:30 GMT
You can store almost anything in an autotext entry and use vba code to place
it where you want. To see the code, try recording a macro while inserting an
autotext entry manually and revise the code as needed.

> Is it possible in VBA to store a Symbol Font (i.e. Wingdings) character
> within a String variable?
[quoted text clipped - 8 lines]
>
> RPJ

Signature

Russ

drsmN0SPAMikleAThotmailD0Tcom.INVALID

 
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.