Displaying an M-Dash w/VBA code

I need to be able to display an M-Dash instead of a normal hyphen in a word document.  I need to be able to put it in code so that when that particular string is being displayed, the m-dash will appear with it.

Suggestions?
CapnCrnchAsked:
Who is Participating?
 
bruintjeConnect With a Mentor Commented:
Hi CapnCrnch,

not sure but you could look at
----------
Selection.InsertSymbol CharacterNumber:=8212, Unicode:=True, Bias:=0
   (This happens to be the symbol for an "M-dash")
----------
source: http://www.jojo-zawawi.com/code-samples-pages/code-samples.htm

hope this helps a bit
bruintje
0
 
CapnCrnchAuthor Commented:
Thanks for the response.  I finally found an answer.  Inserting a chr(151) does the trick.
0
 
bruintjeCommented:
glad you found your answer and thanks for the grade ;)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.