I am working on a program where I would like to programmatically take HTML and insert it into a word doc, and have it show up in word as it does in HTML.
When I run a line of code like this :
- Code: Select all
newParagraph.AppendHTML("<p style='font-weight:\"bold\"'>Font Weight = Bold</p><span><b>b tag</b></span><span><strong>strong tag</strong></span>");
the first part with "font-weight: 'bold'" shows up correctly in the generated document, but the <b> and <strong> tags seem to do nothing at all. I've tried all sorts of things, like using <p>, <span>, and <div> to separate these, but nothing seems to make the <b> or <strong> change the look of the text. Is there anything I can do to make the generated document obey the <b> and <strong> tags? I get the feeling I'm missing something about styles or something document wide, but would love some help!
Thanks much!
- Chris