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/
Quantum - 29 Jan 2005 12:51 GMT
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?
> Hi,
>
[quoted text clipped - 8 lines]
> Word XP, Win 98
> http://word.mvps.org/
Helmut Weber - 29 Jan 2005 14:03 GMT
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/
Helmut Weber - 29 Jan 2005 14:32 GMT
>Not that the letter currently there will be replaced by "J".
That should have been
Note (!) that the letter currently there will be replaced by "J".
Quantum - 29 Jan 2005 12:55 GMT
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.
> Hi,
>
[quoted text clipped - 8 lines]
> Word XP, Win 98
> http://word.mvps.org/
Quantum - 29 Jan 2005 13:37 GMT
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.
> Hi,
>
[quoted text clipped - 8 lines]
> Word XP, Win 98
> http://word.mvps.org/