problem exporting result from vb.net to ms word
-
Dear friends hi I m facing a problem.I've to export result fetched by vb.net code in ms word.I did it but after quiting word in vb.net it ask me to save changes when document get loaded.if i don't close ms-word instance in vb.net code it leave a winword.exe process after i quit my program.so can u guide me how to avoid this message when document loaded. "do u want to save changes?". I think If i save my document before, closing it problem can be solved but I don't know how to do this. Please help me !!!!!!!!!!! Thanking you !!! Uttam kumar :confused::confused: be the best...
-
Dear friends hi I m facing a problem.I've to export result fetched by vb.net code in ms word.I did it but after quiting word in vb.net it ask me to save changes when document get loaded.if i don't close ms-word instance in vb.net code it leave a winword.exe process after i quit my program.so can u guide me how to avoid this message when document loaded. "do u want to save changes?". I think If i save my document before, closing it problem can be solved but I don't know how to do this. Please help me !!!!!!!!!!! Thanking you !!! Uttam kumar :confused::confused: be the best...
I really don't know how the Word works but with the MapPoint object you have a property called Saved. If you set it to True before closing it won't bother you with any request. I guess/hope there's something similar in the Word Interop. have a look at the doc. Well I did look at the doc and easily found: Quit: Quits Word. You can optionally save any open documents, passing a value from the WdSaveOptions enumeration: wdSaveChanges, wdPromptToSaveChanges, and wdDoNotSaveChanges. The following fragment shows all three different ways to quit Word: (...) -- modified at 7:38 Tuesday 29th November, 2005
-
Dear friends hi I m facing a problem.I've to export result fetched by vb.net code in ms word.I did it but after quiting word in vb.net it ask me to save changes when document get loaded.if i don't close ms-word instance in vb.net code it leave a winword.exe process after i quit my program.so can u guide me how to avoid this message when document loaded. "do u want to save changes?". I think If i save my document before, closing it problem can be solved but I don't know how to do this. Please help me !!!!!!!!!!! Thanking you !!! Uttam kumar :confused::confused: be the best...
Why would Word prompt you to save while opening a file. Are you sure about the location that the message is thrown from? My implementation of opening/closing MS Word doc from VB.NET that does not prompt for anything and does not leave a winword process running. Dim app As Microsoft.Office.Interop.Word.Application app = New Microsoft.Office.Interop.Word.Application app.Visible = True Dim doc As Microsoft.Office.Interop.Word.Document doc = app.Documents.Open("C:\Test.doc", Type.Missing, True, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, True, Type.Missing, Type.Missing, Type.Missing, Type.Missing) doc.Close(False, Type.Missing, Type.Missing) app.Quit()
-
Why would Word prompt you to save while opening a file. Are you sure about the location that the message is thrown from? My implementation of opening/closing MS Word doc from VB.NET that does not prompt for anything and does not leave a winword process running. Dim app As Microsoft.Office.Interop.Word.Application app = New Microsoft.Office.Interop.Word.Application app.Visible = True Dim doc As Microsoft.Office.Interop.Word.Document doc = app.Documents.Open("C:\Test.doc", Type.Missing, True, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, True, Type.Missing, Type.Missing, Type.Missing, Type.Missing) doc.Close(False, Type.Missing, Type.Missing) app.Quit()
hi dear first of all thanks for ur quick answer!.;) Actually I m opening a new document and then pasting my result in tabluar form.so after this if i close this then it as me for changes to be saved or not. if i save this document from vb.net then it shows me save dialog box.I want to avoid that.is there any way by which i can save my document with vb.net only.it must not pop up save dialogbox for the name.:-O be the best...