word PrintOut error the printer is not installed

用thisApplication.ActivePrinter=printer;指定打印机  
   
  Word.Document   thisDocument   =   null;  
  Word.Application   thisApplication   =   null;//new   Word.ApplicationClass();  
  CreateWordDocument(faxfile,ref   thisDocument,ref   thisApplication);  
  string   printer=thisApplication.ActivePrinter;  
  thisApplication.ActivePrinter="I-FaxPrinter";  
  PrintOutDoc(thisDocument);  
  faxpath=@"c:\tempfax.tif";  
  object   saveChanges   =   Type.Missing;  
  object   originalFormat   =   Type.Missing;  
  object   routeDocument   =Type.Missing;  
  thisApplication.ActivePrinter=printer;  
  thisApplication.Quit(ref   saveChanges,   ref   originalFormat,   ref   routeDocument);Top
posted @ 2009-03-13 20:04  翔宇编程  阅读(400)  评论(0编辑  收藏  举报
51CTO