![]() ![]() Set templateRange = templateTab.Range(targetRangeToReplace)įor r = 5 To invoicestab.Cells(Rows.Count, 1).End(xlUp).Rowįor Each field In fieldsTab.Range(fieldsTab.Cells(2, 1), fieldsTab.Cells(fieldsTab.Cells(Rows.Count, 1).End(xlUp).Row, 1))Ĭell.Value = Replace(cell.Value, field.Value, invoicestab.Cells(r, field.Offset(0, 1).Value).Value)įullFilePath = "J:\Invoices\" & invoicestab.Cells(r, colFileName).ValueĪctiveTab.ExportAsFixedFormat Type:=xlTypePDF, filename:= _ Set replaceRange = activeTab.Range(targetRangeToReplace) Set invoicestab = Worksheets("Bulk Invoices") Set activeTab = Worksheets("Do Not Touch") It copies the data from the active tab to a template sheet and then exports that template as a PDF. I have button I click and it runs the following code. The amount of PDF I need to generate differs from week to week. I have macro which generates PDFs from data I insert into a sheet. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |