Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

editable word document attachment

Tags:

c#

asp.net

Its a general scenario when we provide an option of attaching a file (MS .doc) to end user. This file is stored in DB as binary. When user try to access this attachment next time, we allow them to download it. Now, here I want to give a feature to user where he should be able to open this doc file on click, edit it and save it without downloading.

like image 786
NayeemKhan Avatar asked Nov 27 '13 11:11

NayeemKhan


1 Answers

.doc is a binary format and not easy to work with - a library such as Aspose, as mentioned by Christian, is definitely the way to go.

However, if .DOCX is acceptable (and that's Office 2007 and higher), then you can achieve what you want in three steps:

  1. Convert .docx to HTML Convert Word to HTML then render HTML on webpage

  2. Display the HTML using any rich text control of your choice What is the best rich textarea editor for jQuery?

  3. Finally, convert HTML back to .docx: Convert Html to Docx in c#

like image 82
David Airapetyan Avatar answered Oct 31 '22 21:10

David Airapetyan