PDA

View Full Version : Maimerge last excel record



tlchan
09-18-2012, 09:02 AM
HI there,
I'm trying mailmerge form letter with excel data eg 6 records. But outcome turnout generating 500+ form letters. How to prevent from merge with blank record or how to code in VBA that the last record in mailmerge is the last data record in excel sheet.


Thanks

macropod
09-19-2012, 10:16 PM
Open the Excel file, press Ctrl-End and that will take you to the last 'in use' cell. You'll prpbably find that row is empty. Select the entire row, then extend the selection upwards until all unused rows are selected. Press Delete then save & close the workbook. Your mailmerge should now stop at the last data row.

tlchan
09-20-2012, 07:21 AM
Thanks Macropod. Your suggestion did improve the situation. However it still left a few blank pages. Is there a VBA to remove the blank pages while processing mail merge ?


Thanks

macropod
09-20-2012, 03:35 PM
If you're still getting blank pages, that suggests you didn't clear the entire unused range. Try it again.