![]() |
|
|
|
#1
|
||||
|
||||
|
I get a type mismatch when I try this code. Code:
Set oRng = DescriptionBox.TextRTF
oRow.Cells(1).Range.FormattedText = oRng
|
|
#2
|
|||
|
|||
|
Quote:
Code:
oRow.Cells(1).Range.FormattedText = DescriptionBox.TextRTF |
|
#3
|
||||
|
||||
|
Quote:
Code:
oRow.Cells(1).Range.FormattedText.Text = Descriptionbox.TextRTF
{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl {\f0\fnil\fcharset0 Tahoma;}{\f1\fnil\fcharset2 Symbol;}} into the cell.
{\*\generator Riched20 12.0.6606.1000;}\viewkind4\uc1 \pard{\pntext\f1\'B7\tab}{\*\pn\pnlvlblt\pnf1\pnin dent0{\pntxtb\'B7}}\fi-360\li360\f0\fs17 This is an example\fs17 \par } Last edited by jpb103; 06-19-2014 at 12:25 PM. Reason: Added code |
|
#4
|
|||
|
|||
|
Quote:
You're setting oRng (which I assume has been defined as a Range object) to a string of formatted text. That should be your type mismatch. And in your second example, you're setting the FormattedText.Text to the RTF data, which is what you are getting. You need to set the FormattedText to the RTF string. |
|
| Tags |
| rich text, tables, userforms |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Rich text/Plain text Content Controls in Template
|
michael.fisher5 | Word | 9 | 11-19-2014 06:36 AM |
Rich Text Content Control - Allow User Formatting
|
keithacochrane | Word | 1 | 05-28-2012 05:06 PM |
How to I make text Bold in a User Form -Visual Basic
|
gurp99 | Word VBA | 11 | 03-12-2012 04:05 PM |
| My plain text post got converted to rich text in a reply, how to convert it back? | david.karr | Outlook | 0 | 01-05-2012 09:46 AM |
| Templates: automatic text generation from Rich Text content control | Chickenmunga | Word | 0 | 10-01-2008 11:16 AM |