The mail merge process creates a sheet of mailing labels that you can print, and each label on the sheet contains an address from the list. If you want to send a mass mailing to an address list that you maintain in a Microsoft Excel spreadsheet, you can use a Microsoft Word mail merge. So the macro will check how many lines are populated and then copy down as many groups of those 5 lines as needed.Excel for Microsoft 365 Excel for the web Excel 2021 Excel 2019 Excel 2016 Excel 2013 Excel 2010 More. The number of lines change per file so I don't want to hard code formulas for hundreds of lines when they will not be needed. The reason is that my spreadsheet sometimes has hundreds of lines and each line has the data for one label. I would possibly use indirects because hard coded formulas would not work in this case. So my question was if I could, or with help, have that range, let's say b5:c10, copied down to b12:c17 - same idea as the print range you made. I already do it in my other sheets but I am copying only lines down so it's easy. I'm thinking of a way to have a macro copy down those 5 rows of text (which will later be formulas pulling data from another sheet) based on whether a cell has a quantity. I don't think I explained my other question earlier clearly. Maybe the macro is sending the data so quickly that the printer can't process it all and hiccups every few labels. Anyway, it doesn't affect the usefulness of the code as it works great. The funny thing is the printer is printing several labels at a time and sometimes not. I was using the name of the printer in quotes as I saw online, but do I have to name the port? Thanks for the help.Īpplication.Dialogs(xlDialogPrinterSetup).ShowĪctiveSheet.PrintOut Copies:=Range("A5").ValueĪctiveSheet.PrintOut Copies:=Range("A11").Value I was also having trouble naming the printer in the code. So I was going to repeat the code that many times but I doubt that's the best way. I may have as many as 20 or 30 ranges to print one after the other in one pass. I included my test excel file with just 2 ranges and with a cell next to each range containing the number of copies. The idea is to print several ranges of text sequentially - the range of each section will not change. I have the code working OK so far but I think it needs improvement. Hi, I am trying to print labels from an excel file to a Zebra thermal printer.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |