A
Andrew Bernhardt
How do I append formatted text to a table cell that has text with a
different format (i.e. append a word in blue letters to a cell that has
words in other colors)? If I set a range to a cell and collapse it to the
end of the range, the text will get added to the next cell.
For example, if a document has one table and I want to append the word
"TEST" in red letters to cell(1,3), the following does not work:
Dim R As Range
Set R = ThisDocument.Tables(1).Cell(1, 3).Range
R.Collapse wdCollapseEnd
R.InsertAfter "TEST"
R.Font.Color = wdColorRed
The word is instead added to the beginning of cell(1,4).
- Andrew Bernhardt
different format (i.e. append a word in blue letters to a cell that has
words in other colors)? If I set a range to a cell and collapse it to the
end of the range, the text will get added to the next cell.
For example, if a document has one table and I want to append the word
"TEST" in red letters to cell(1,3), the following does not work:
Dim R As Range
Set R = ThisDocument.Tables(1).Cell(1, 3).Range
R.Collapse wdCollapseEnd
R.InsertAfter "TEST"
R.Font.Color = wdColorRed
The word is instead added to the beginning of cell(1,4).
- Andrew Bernhardt