J
JGM
Greetings to all!
On Word XP, I have a userform that has a richtextbox. I am trying to use
either the standard richtx32.ocx or a freebie I have found on the Internet:
RTF2.ocx (by Lebans).
The result is the same... for testing purposes I used the following code to
insert the text from the richtextboxes in the current document:
Selection.TypeText RTF21.rtfText
Selection.TypeText vbCrLf
Selection.TypeText RichTextBox1.TextRTF
but what I get is:
{\rtf1\ansi\ansicpg1252\deff0\deflang3084{\fonttbl{\f0\fswiss\fprq2\fcharset
0 System;}}
{\*\generator Riched20 5.40.11.2210;}\viewkind4\uc1\pard\ul\b\f0\fs20 Sample
text in a RichTextBox\par
}¶
¶
{\rtf1\ansi\ansicpg1252\deff0\deflang3084{\fonttbl{\f0\fswiss\fprq2\fcharset
0 System;}{\f1\fnil\fcharset0 Tahoma;}}
{\*\generator Riched20 5.40.11.2210;}\viewkind4\uc1\pard\b\f0\fs20 Sample
text in a RichTextBox\b0\f1\fs17
\par }¶
instead of
"Sample text in a RichTextBox" with various font/paragraph attributes.
How do I transfer the rich text code from the richrextbox to the document so
that they take effect? Is this possible or is a richtextbox for onscreen
work only?
What am I missing?
By the way, I prefer working with the Lebans'one because the user can do a
right-click and change all the attributes while in the typing text in the
richtextbox control. With the Microsoft one, I do not know how to achieve
the same result, but I can copy preformated text into it... and still obtain
ther same result.
Thanks.
On Word XP, I have a userform that has a richtextbox. I am trying to use
either the standard richtx32.ocx or a freebie I have found on the Internet:
RTF2.ocx (by Lebans).
The result is the same... for testing purposes I used the following code to
insert the text from the richtextboxes in the current document:
Selection.TypeText RTF21.rtfText
Selection.TypeText vbCrLf
Selection.TypeText RichTextBox1.TextRTF
but what I get is:
{\rtf1\ansi\ansicpg1252\deff0\deflang3084{\fonttbl{\f0\fswiss\fprq2\fcharset
0 System;}}
{\*\generator Riched20 5.40.11.2210;}\viewkind4\uc1\pard\ul\b\f0\fs20 Sample
text in a RichTextBox\par
}¶
¶
{\rtf1\ansi\ansicpg1252\deff0\deflang3084{\fonttbl{\f0\fswiss\fprq2\fcharset
0 System;}{\f1\fnil\fcharset0 Tahoma;}}
{\*\generator Riched20 5.40.11.2210;}\viewkind4\uc1\pard\b\f0\fs20 Sample
text in a RichTextBox\b0\f1\fs17
\par }¶
instead of
"Sample text in a RichTextBox" with various font/paragraph attributes.
How do I transfer the rich text code from the richrextbox to the document so
that they take effect? Is this possible or is a richtextbox for onscreen
work only?
What am I missing?
By the way, I prefer working with the Lebans'one because the user can do a
right-click and change all the attributes while in the typing text in the
richtextbox control. With the Microsoft one, I do not know how to achieve
the same result, but I can copy preformated text into it... and still obtain
ther same result.
Thanks.