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
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