Jason Salas' WebLog

On-air and online: making people laugh, making people think, pissing people off

Sponsors

ASP.NET sites that kick ass

Pals with blogs

Podcasts I listen to

Accessing Word documents programmatically with an ASP.NET web form

I'm trying to incorporate a new feature into my company's CMS that doesn't require population of form fields in a web page.  Basically, the system will read a DOC/RTF file from a directory and programmatically extract data to be inserted into a database, based on a predefined structure within the document (title, author, body).  Sounds like the perfect candidate for BizTalk Server, doesn't it?  Unfortunately, I'm not that lucky.  So, I'm attempting to do so by hand.

It's simple enough to do, but examples don't exactly abound on the Web, so I'm doing some testing of some new concepts I've developed about reading/extracting the contents of such a binary file and using it via an ASP.NET web form.  This is going to further automate an already-speedy proces for getting news from our newsroom management system to our CMS to the public World Wide Web.

Pretty geeky way to spend a Sunday night, eh?

Comments

anon said:

Bet you can't wait for Office 12 and the new XML file formats. This task would be dramatically simpler then.
# October 11, 2005 12:17 AM

Jason Salas said:

Perhaps. I'd still need to programmatically define an XmlDocument and read from it, which would be nice, but I'm sure I can do the same thing now. Any hints?
# October 11, 2005 12:40 AM

Vikash Anand said:

Sir,

I want to read contant of word document programatically throught asp.net with c# and save this contant to sql server in varchar format.

ok bye

# January 22, 2008 3:40 AM
Leave a Comment

(required) 

(required) 

(optional)

(required)