Reputation: 542
This may be completely impossible, but I'll ask anyway :)
In our application we save all our data in a database (no surprises there). Among other thing we have some documents saved, and lets the user edit these documents using an in-build editor we have.
We would like to replace this with Microsoft Word (we don't have be backward compatible, so just forget about the existing documents).
Ideally I would like a functionality similar to OneDrive or SharePoint. The user finds the document in my application, opens in Word, and changes are automatically save back to where the document was opened from.
Having looked at Microsoft.Office.Interop.Word
I'm able to open and edit Word files, but I need to save to the database (I think a stream would suffice. I think I'll be able to redirect that to the database). Anyone that knows of a way to open a stream instead?
I have also looked at DocumentFormat.OpenXml.Wordprocessing
which seems to give me the handles to edit Word documents even from streams, but I would really like to open in the Word application, and not have to reimplement Word from scratch.
The application is written in C# with WPF if it matters :)
Yours /peter
Upvotes: 0
Views: 951
Reputation: 27974
You have two options to go:
The second option leads to a rather large development effort and/or use of 3rd party libraries that may implement such functionality. Should you consider developing it yourself, I'd start from Microsoft's open specifications.
Upvotes: 1