Live Scores
Shareware
Movie Stars
in
Miscellaneous
Progamming
(Entire Site)
Questions and answers to issues related to Microsoft: Windows, Applications, Development, Hardware, Server, Internet Protocols, Database, Exchange .
»
Progamming
»
Miscellaneous
»
Changing Individual Lines of Text in a Table Cell
Changing Individual Lines of Text in a Table Cell
I have a Word Table and I am trying to use VBA to change the text properties in a single cell. Specifically, I need to make the first line bold, and all of the following lines (and the total number of lines will vary) italicized. I know how to make these changes to all of the text in a cell. How do I update different lines in one cell differently?
Solution: Changing Individual Lines of Text in a Table Cell
Are the lines delineated by paragraph marks, and do you want to change the selected cell? If so, then this should do it:
Sub BoldCellPara1()
Selection.Cells(1).Range.F
ont.Italic
= True
Selection.Cells(1).Range.P
aragraphs(
1).Range.F
ont.Bold = True
End Sub