tags:

views:

38

answers:

2

Is it possible to access the .doc files and update in that document using javascript .

Thanks

+2  A: 

I don't believe you can do this, for one .doc isn't stored in a format JavaScript can easily interpret...and I'm unaware of anyone ever taking the effort to port the .doc format to JavaScript. If it was possible, the library would need to edit it in memory and upload it again in some other format, base64 encoded perhaps?

In any case this is no small project, it's a huge effort and I've never seen anything close. That being said, there are alternatives depending on your exact needs, for example these guys do a browser implementation: http://www.textcontrol.com/en_US/products/dotnet/overview/

I'm not sure if there are others, and I haven't personally used theirs, but maybe that'll put you on the right track to finding the client solution you're after.

Nick Craver
A: 

You used to be able to do this with ActiveX objects in IE. Probably still can. Code looked something like this:

var word = new ActiveXObject("Word.Application");
word.Visible = true;
// ...

See the reference for word's object model.

no