Help!

Normal.dot problem


Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Program Add-Ins RSS
Next:  Threading, Outlook 2007  
Author Message
Nuno
External


Since: Jul 19, 2007
Posts: 1



PostPosted: Thu Jul 19, 2007 10:57 am    Post subject: Normal.dot problem
Archived from groups: microsoft>public>outlook>program_addins (more info?)

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
Back to top
Display posts from previous:   
Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Program Add-Ins All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum