Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Word VBA Mail Merge

Status
Not open for further replies.

lespaul

Programmer
Feb 4, 2002
7,083
US
I have a Delphi program that I use to create a mail merge. I create an excel spreadsheet with my data and I have a label template to merge into (Avery template 5267 - 20 rows of 4 labels). Everything works ok, but... if I use Destination := wdSendToNewDocument and then print the new document, it prints 21 rows of labels. So I decided to delete a row so the extra one would be the last one. But then it only printed the 19! So I decided to try wdSendToPrinter, which correctly printed out 20 rows, but the server kept throwing an exception and my program crashed (plus even though I have display alerts = False and Options.PrintBackground = True, I still kept getting the print dialog)!

Does anyone know what the problem may be?

Thanks for any help!

Leslie


There are 10 types of people in the world -
those who understand binary
and
those who don't!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top