

I just want to find SOME way to fill out these labels for every record in the file creating new pages ever 10 labels. Set oWB = ("C:\Users\UserName\Documents\Sticker Maker.xlsm")ĭo While oWB.Sheets("Barcode").Cells(RowLoc, 1) ""ĮxcelArray(RowLoc, 1) = oWB.Sheets("Barcode").Cells(RowLoc, 1)ĮxcelArray(RowLoc, 2) = oWB.Sheets("Barcode").Cells(RowLoc, 2)ĮxcelArray(RowLoc, 3) = oWB.Sheets("Barcode").Cells(RowLoc, 3)ĮxcelArray(RowLoc, 4) = oWB.Sheets("Barcode").Cells(RowLoc, 4)ĮxcelArray(RowLoc, 5) = oWB.Sheets("Barcode").Cells(RowLoc, 5)ĮxcelArray(RowLoc, 6) = oWB.Sheets("Barcode").Cells(RowLoc, 6)Ī("Job_Name").Value = ExcelArray(RowLoc, 1) 'this fails because it's read only Sub OpenExcelFile()ĭim ExcelArray(1 To 10000, 1 To 6) As Variant but the way "next record" functions screws up everything if I try to do the right side records because it will switch to the next record without any way to go back and finish the first label.

I need to generate 10 labels per sheet of paper in two columns If I mail merge it I can get the left columns. This information can easily be transferred from Excel to a document in. I have managed to import the data into word from excel but can't find a way to get the data from the array I stored it in to the specific merge field locations I need. When compiling a report or working on a project, sometimes it's easiest to collect data in a table format via Microsoft Excel. I am working on something very similar to what this post seems to be talking about. I'm kinda new in VBA so sorry if I asked too much and hope you will help! Word - Getting the info from the excel table(sheet2) and mail merge into a template via script.
#HOW TO MAIL MERGE FROM EXCEL TO WORD 2011 IN A TEMPLATE CODE#
I tried to search online for a code but wasn't successful in finding any that even close to what I asked.Įxcel - Extracting the Data from the second sheet(Sheet2) I created A VBA Script that adds a checklist in row G and only the checked rows are extracted into a new sheet(Sheet2) this way it isolates only the needed info from the table. The file contains 8 columns in which the data is stored(name, gender, age, doctor's name, address, city, hospital, checkbox(v) all at Sheet1. I have been trying for a while to automate something that I do on daily basis, Which is to Mail Merge from an Excel Workbook Which updates every day with new registrations using VBA, The purpose I need the script is that it has to produce a new mail with the same Template for only checked rows in the Checklist I have created when it's finished it also needs to create labels.
