I have a word document which is a blank form. I need to be able to fill it in programatically using .NET, and print out the result.
The form I have is a Word document, but I could obviously convert this to PDF if it is needed.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
As Josef said, if it’s OpenXML (Office 2007) document you can use the managed .net classes to easily update the document, which is basically modifying a bunch of xml files, zipped and renamed to .docx . Visual Studio tools for Office (VSTO) should help you out if need be for Office 2000 and 2003. For previous versions of office you’d need to use Office Automation COM Classes..
Now for updating fields in the word document, you’d need to identify where to insert text to. So if you have some bookmarks or markers to identify the places where you’d like to insert text… you can seek to that position and insert text. Printing the word doc should be simple since Word has printing support built in. Should be as easy as calling the right method.