Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / March 2004

Tip: Looking for answers? Try searching our database.

Merge to printer through code is cropping my pages

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Curtis Justus - 04 Mar 2004 16:18 GMT
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
Peter Jamieson - 05 Mar 2004 09:12 GMT
My only thought: could be something to do with "Allow A4/Letter paper
resizing" (e.g. in Tools|Options|Print in the Word UI)

--
Peter Jamieson - Word MVP
Word MVP web site http://word.mvps.org/

> Hello,
>
[quoted text clipped - 38 lines]
> Thanks in advance,
> cj
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.