By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,921 Members | 1,433 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,921 IT Pros & Developers. It's quick & easy.

C#, docx

P: n/a
lsg
Hi,
Anybody know how to open docx (MS Word) file, retrive all formfields,
insert text and print in c# ?

Best Regards
Leszek
Nov 28 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
You have two choices:
1) use the Word Object model by setting a COM tab reference to the
appropriate version of Word.

2)Since docx files are XML, parse the Xml with the Office Xml APIs:

http://msdn2.microsoft.com/en-us/library/ms406049.aspx

--Peter
"Inside every large program, there is a small program trying to get out."
http://www.eggheadcafe.com
http://petesbloggerama.blogspot.com
http://www.blogmetafinder.com

"lsg" wrote:
Hi,
Anybody know how to open docx (MS Word) file, retrive all formfields,
insert text and print in c# ?

Best Regards
Leszek
Nov 28 '07 #2

P: n/a
On Nov 28, 2:10 pm, Peter Bromberg [C# MVP]
<pbromb...@yahoo.NoSpamMaam.comwrote:
You have two choices:
1) use the Word Object model by setting a COM tab reference to the
appropriate version of Word.

2)Since docx files are XML, parse the Xml with the Office Xml APIs:
Docx files are not xml. They are zip files that contain the xml
files. To open them and manipulate their contents, the OP will want
to look at the System.IO.Packaging namepsace from .NET 3.0 and above.

--
Tom Shelton
Nov 29 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.