Saving a word document for different users
Posted on 2005-03-14
I have a windows application written with c#. I integrated Microsoft word into it so I can type, save and spell check documents. This is for every user in my database. A customer information is loaded on a form based on a phone number(id) for display and the button exists on the form.
How can I save the content of this word document to my sql server database for this particular user. This is like a note for every customer.
Here is the code behind the command button.
object oMissing = System.Reflection.Missing.Value;
object oEndOfDoc = "\\endofdoc"; /* \endofdoc is a predefined bookmark */
//Start Word and create a new document.
oWord = new Word.Application();
oWord.Visible = true;
oDoc = oWord.Documents.Add(ref oMissing, ref oMissing,
ref oMissing, ref oMissing);