Merge to printer through code is cropping my pages

C

Curtis Justus

Hello,

I have a mail merge document that I am loading using the Word object model
in .NET. If I merge the data items and display the resulting document on
screen and have them print the document, all of the contents are printed
correctly. However, if I specify the destination of the merge to be a
printer, then the bottom two inches is cut off of my document when printing.
I am using the same printer in both instances.

Here is the code that I use to print:

/* wrdMerge, wrdDoc, and wrdApp are all initialized above */

PrintDialog print = new PrintDialog();
PrintDocument printdoc = new PrintDocument();
print.Document = printdoc;

DialogResult dr = print.ShowDialog();
if (dr != DialogResult.OK)
{
string msg = "WARNING: The merge has been cancelled. If you" +
Environment.NewLine + "indicated to save data to the Document Management
System," +
Environment.NewLine + "this has already been completed.";
throw new ApplicationException(msg);
}

printdoc.PrinterSettings.PrinterName = print.PrinterSettings.PrinterName;
wrdApp.ActivePrinter = print.PrinterSettings.PrinterName;

wrdMerge.Destination = Word.WdMailMergeDestination.wdSendToPrinter;

try
{
/* Now execute the merge, which will also send it to the destination. */
wrdMerge.Execute(ref oFalse);
}

Any thoughts?

Thanks in advance,
cj
 
P

Peter Jamieson

My only thought: could be something to do with "Allow A4/Letter paper
resizing" (e.g. in Tools|Options|Print in the Word UI)
 

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

Top