C#.net question.

Spydermag68

Platinum Member
Apr 5, 2002
2,617
99
91
I know how to make a text file, but I want VS C#.net 2005
to output a formatted word document.

Any good websites out there?

Thanks.
 

Ken g6

Programming Moderator, Elite Member
Moderator
Dec 11, 1999
16,836
4,815
75
I know you can use VBScript to create a Word document, if you have Word installed. If worst comes to worst, you could have C# write and execute some VBScript to create the document.

Does it have to be Word format? Any reason it can't be HTML, or PostScript, or something?
 

joutlaw

Golden Member
Feb 18, 2008
1,108
2
81
Word automation is pretty tricky. It might be better with Word 2007, but my experience with Word 2003 has been pretty labor involved.

We do a lot of automation for letters that populate bracket variables from items in a database.

Basically we use the interops in Visual Studio to open the word file, save off to .rtf, then parse the rtf for the bracket variables and do a sort of find and replace. Then after that we save it back .doc and save off a copy somewhere etc...