Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Experts,

As per client requirement I want to display , edit the word document on the view and I want to save modified word document into the Database.

1) I m displaying word document to HTML TextArea control after converting word document to HTML string using OPENXML DLL , I m able to display word document text as it is in the HTML Textarea control but I m losing formatting and alignments of text.

I want word document content alignment and formatting should same as it is in the word document when it will render in the TextArea control.

I m not able achieving formatting and alignment of word document content .


How Can I do it using OPENXML only (without using Microsoft Word interop.) OR Is there any other approach using which atleast we can display it on the view.


2) I want to edit word document after displaying . How can I do it


Please help out with these issues. I will appreciate you. Thanks in advance.
Posted
Updated 26-Oct-15 3:47am
v3
Comments
Philippe Mori 26-Oct-15 12:59pm    
If you want to do that, then you are asking for trouble... Best to edit Word document using Word itself.

Or don't use Word format at all...

Without massive effort, you will probably never achieve enough compatibility... Anyway, you should have done your research before accepting client requirement...
argeraju 27-Oct-15 0:32am    
Thanks Philippe.

1 solution

You can't do that using a conversion to HTML using OpenXML. The only way you're going to keep the formatting and everything else is if the client has Word installed (obviously, an appropriate version for the document!) and sent the document to the client an an intact Word file, let the user edit it in Word and then Word has to send it back to "save" it.

No, I don't have any example code.
 
Share this answer
 
Comments
argeraju 27-Oct-15 1:24am    
Thank you Dave.
argeraju 27-Oct-15 1:26am    
Thanks Dave. At least I have to display word document on the view without using third party tools. I m trying for it using Google doc viewer.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900