c# - how to add many colors to single paragraph -


i try make multi color in same line list wrong result

i need make below image :

enter image description here

my current code :

paragraph = range.paragraphs.add(); paragraph.range.text = "test"; paragraph.range.font.color = word.wdcolor.wdcolorskyblue;  paragraph = range.paragraphs.add(); paragraph.range.text = "word"; paragraph.range.font.color = word.wdcolor.wdcolorred;  paragraph = range.paragraphs.add(); paragraph.range.text = "color"; paragraph.range.font.color = word.wdcolor.wdcolorbrown; 

the result show 3 lines

since need 50 rep comment, i'll mark answer. reading, should make sentence class , when you're done sentence add paragraph.


Comments

Popular posts from this blog

java - Static nested class instance -

c# - Bluetooth LE CanUpdate Characteristic property -

JavaScript - Replace variable from string in all occurrences -