PrintOut of word document only ( no save )

  • Thread starter Thread starter Kim S
  • Start date Start date
K

Kim S

I have a word document I only want to printout ( not save as file ) and I
use Word printout method in backgrund but my XP operativ i so slow that a
"dummy"
dociment also get stored.


which word Printout or quit parameter have I to set to diff. than Missing
Obj. to get word printout to work Its can't be right that I have to user
timer delay of word quit command.

I have try to look in them parameter I have access to.
 
Now I know
word.Application msword = new word.Application();


object missing = Type.Missing;

msword.Visible = false;
try
{
word.Document doc = LinqTool.WordCreateDocument(ref
msword);

LinqTool.WordPrint(ref doc,
"tttttttttttttttttttttttttttttt");
}
catch (Exception ex)
{
MessageBox.Show("Analysis file could not be
saved\r\n\r\n" + ex.Message, "Save xml Error");
}
finally
{ // Always Close the Word document
object Save = (object)false;
msword.Quit(ref Save, ref missing, ref missing);
}

First parameter in Word quit is seting to false then no dummy document is
tryed to be save
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top