Click here to Skip to main content
15,889,992 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
code should be in .net only. and moreover when saving the .doc should reflect the changes done and save the same in .doc file

What I have tried:

i haven't started yet needs some dummy codes to get started with the coding please help me as soon as possible.apart from this if anyone is having good knowledge of .net please guide me.as i am completely new to .net platform
Posted
Updated 20-Jun-16 20:46pm
v2
Comments
Jim Meadors 21-Jun-16 1:12am    
Do you mean DOCX ? I don't think you can access .doc with .net
Sergey Alexandrovich Kryukov 21-Jun-16 2:30am    
It is quite possible, but... .DOC is not standard; and it's hard to deal with.
—SA
BillWoodruff 21-Jun-16 2:25am    
The DocX format is complex and parsing it would be a major project; you need to do some initial research:

https://www.google.co.th/search?sourceid=chrome-psyapi2&ion=1&espv=2&ie=UTF-8&q=.net%20docx%20to%20rtf&oq=.net%20docx%20to%20rtf&aqs=chrome..69i57j0.6294j0j7

Then come back here with code and specific questions. This is not a code-writing service.
Member 12580715 21-Jun-16 2:31am    
in ms word we save file with .doc only,but jim if you think we can work with .docx also,lets see

1 solution

It can be quite a big work, especially if you need view and edit the documents in your application. I can just give you some initial links and very basic advice.

I hope .docx would be enough for you, not .doc. Then the best option would be using Microsoft Open XML SDK.
Please see:
https://msdn.microsoft.com/en-us/library/office/bb448854.aspx,
https://www.microsoft.com/en-us/download/details.aspx?id=30425.

See also my past answers referenced in this one: How to add Microsoft excel 15.0 object library from Add Reference in MS Visual Studio 2010.

This is another option, with one major benefit: open-source: NPOI.

If you still had to support obsolete proprietary non-standard .doc, you would be in big trouble. However, one way to solve the problem would be using Libre Office SDK. It would be a lot of work.

Finally, I cannot miss one very basic advice: consider not using Office formats at all. Yes, the modern format is standardized, the standard is open (ECMA), but it is still based on proprietary product, Microsoft's revenue maker. Keeping closer to open-source technologies and more open standards would always be beneficial. Anyway, you decide.

—SA
 
Share this answer
 
v2
Comments
Member 12580715 21-Jun-16 2:52am    
THANK YOU SO MUCH Sergey Alexandrovich Kryukov ..IT REALLY HELPED ME ..THANX A TON AGAIN :) :)
Sergey Alexandrovich Kryukov 21-Jun-16 2:54am    
You are welcome.
Will you accept the answer formally then?
—SA
Sergey Alexandrovich Kryukov 21-Jun-16 3:00am    
I removed broken link (the question was deleted, unfortunately), replaced with 2 Microsoft links.
—SA
Member 12580715 21-Jun-16 3:00am    
SERGEY!! i have started coding now lets see will it work or not ...i get back with my solution and update ..
Sergey Alexandrovich Kryukov 21-Jun-16 3:02am    
Sure...
(Please better avoid ALL CAPS writing. I tolerate it, but many will perceive it as rude manner. On Web etiquette, all caps is considered as shouting.)
—SA

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