printing with word in .Net application

Tech-Archive recommends: Fix windows errors by optimizing your registry



Hello,

In my .net application, I use word templates for printing. I programmatorically fill in the template, and add it to word, then I print the word document.

However, I always get the message:

The margins of section x are set outside the printable area of the page. Do you want to continue?

This is my code:


pd.PrinterSettings = New System.Drawing.Printing.PrinterSettings
pd.ShowDialog()

myword.ActivePrinter = pd.PrinterSettings.PrinterName
myword.DisplayAlerts = Word.WdAlertLevel.wdAlertsNone


'this line is causing the error:
myword.ActiveDocument.PrintOut(, , , , , , , pd.PrinterSettings.Copies)


I can 't get rid of this message. Any help?

Many thanks,

Steven
.



Relevant Pages

  • Problems printing
    ... We have an ERP software package that uses Word templates to print out ... We started noticing that after printing these word template reports, ... only couldn't print out of Excel. ... the only way I've been able to print to Excel after printing these ...
    (microsoft.public.office.misc)
  • Excel printing problems
    ... We have an ERP software package that uses Word templates to print out ... We started noticing that after printing these word template reports, ... only couldn't print out of Excel. ... the only way I've been able to print to Excel after printing these ...
    (microsoft.public.excel.crashesgpfs)
  • printing with word in .Net application
    ... I use word templates for printing. ... I programmatorically fill in the template, and add it to word, then I print the word document. ... I can 't get rid of this message. ...
    (microsoft.public.dotnet.framework.interop)
  • Re: How can i open a Microsoft Word file thru code?
    ... I have some word templates in my computer.If i want to put a button on a ... To supply a name from Access to your Word document, ... See Word Help for more information. ... (Post to a Word newsgroup to get help with this.) ...
    (microsoft.public.access.formscoding)
  • Re: How can i open a Microsoft Word file thru code?
    ... I have some word templates in my computer.If i want to put a button on a ... To supply a name from Access to your Word document, ... See Word Help for more information. ... (Post to a Word newsgroup to get help with this.) ...
    (microsoft.public.access.formscoding)