Special character not recognized

Q

Quantum

ActiveDocument.Bookmark("mybookmark").Range.InsertAfter "text"

where texts are texts that has special character created through
Insert>Symbol>ShortcutKey method.

How do I get around this problem?
 
H

Helmut Weber

Hi,

I don't think, that string variables or constants
can hold any kind of formatting. What's wrong with
copying and pasting?

Greetings from Bavaria, Germany

Helmut Weber, MVP
"red.sys" & chr(64) & "t-online.de"
Word XP, Win 98
http://word.mvps.org/
 
Q

Quantum

How is the weather in Bavaria?

I am trying to produce a program to
type different set ot text depening on
which checkbox is clicked.

For example:
Userform1 has 2 check boxes
cb1 rain
cb2 sunny

If cb1 is clicked, type "text1" where text is specially formated.
If cb2 is clicked, type "text2" dito

when I print I only want to print text1 or text2, but not both.

If I were to use cut and paste as you suggested, I dont know where to have
text1 or text2 to be stored temporarilly until cb1 or cb2 are clicked.

Do you think there might be a special variable beside string variable that
would hold special character format?
 
Q

Quantum

When I type text1 or text2 using special format on Document (ie not with vb
editor) and then cut and paste it into vb editor, the editor act as if it
does not understand the special format applied and translate it into
nonrecognizeable words.
 
Q

Quantum

If I cant find a way to have string to hold formated text, I am going to
place these formated texts in recorded macros, which I will programatically
trigger to run. I think this may be the only way.
 
H

Helmut Weber

Hi Quantum,
it's minus 12 Celsius here and very sunny
and we got lot's of snow.

Another way would be to get the character number
of a symbol. Lets say Wingdings 74 "Similie".
You store the character number in your macro,
or it's representiation in an ordinary font, like "J",
insert it, and format it as "Wingdings".
Like a smilie at the beginning of a doc.

Dim r As Range
Set r = Selection.Range
r.Start = 0
r.End = 1
r.Text = "J"
r.Font.Name = "Wingdings"

Not that the letter currently there will be replaced by "J".
But i am sure, you can handle that.

I didn't get what that printing issue was.

Greetings from Bavaria, Germany

Helmut Weber, MVP
"red.sys" & chr(64) & "t-online.de"
Word XP, Win 98
http://word.mvps.org/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top