![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
![]()
Hello,
I'm using the COM office interface (Microsoft Office 11.0 Object Library) to write directly in a word document using the Word.Range interface. All is ok in this process, my problem is that when i close the document, if nothing is writed in the document i do not save anything in my Word.Document.Close and Word.Application.Quit functions but when i call the Quit function and for example is at least one instance of the word in use/open then it allways return this error message boxes: "Word cannot save this file because it is already open elsewhere. (c: \document...\Normal.dot)" and then gives an error. "Run time error 5995 - Word cannot write to file" Is there any way of avoid this problem? (if no word document instance is open then this does not happen). I realy don't care about the Normal.dot document, i don't change it, so i don't want to save it, but it allways tells me this. PS: my open function looks like this Word.Application app = new Word.ApplicationClass(); object filename = str_doc_path; object readOnly = false; object confirmconversions = false; object addToRecent = false; object isVisible = true; object writePasswordTemplate = false; // Here is the way to handle parameters you don't care about in .NET object missing = System.Reflection.Missing.Value; // Open the document that was chosen by the dialog Word.Document document = app.Documents.Open( ref filename, ref confirmconversions, ref readOnly, ref addToRecent, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref isVisible, ref missing, ref missing, ref missing, ref missing); Nuno |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
How do I display the normal calendar ? | gary | Outlook - Calandaring | 0 | July 19th 06 01:38 PM |
New messages based on Normal.dot | Nancy | Outlook - General Queries | 0 | July 11th 06 09:03 PM |
The file Normal.dot already exists | Ron Boetger | Outlook - General Queries | 2 | June 22nd 06 04:00 AM |
Normal + 14 Styles | cdf | Outlook - General Queries | 0 | May 11th 06 12:07 PM |
Using a different template then Normal.dot | Brian Beck | Outlook - General Queries | 1 | February 24th 06 11:04 PM |