string to Word with seting fonts and size

  • Thread starter Thread starter Kim
  • Start date Start date
K

Kim

Hi all

I have in my app. a view of pages and generate UniCode UTF8 then I write to
doc file, but want to make the doc file in word. I know how to write some
tekst in a word document generated by C#. But how to set fonts and size,
because if I just convert to word size is not rigth and a better font.

Regards
Kim S
 
Kim,

What version of Word are you targeting? If you are targeting word
before 2003, you will have to automate Word (google it to see examples) and
construct the document that way.

I believe there is a vendor that offers a component to help generate
Word documents outside of Word, but I can't remember the name right now.

If you are targeting Word 2003 and above, you should be able to create
the document in XML.

If you are targeting Word 2007, you should be able to create a docx file
by creating XML files and using the classes in the System.IO.Packaging
namespace.
 
Back
Top