Excel VBA to Save Selected Sheets in Combination as PDFs -



Excel VBA to Save Selected Sheets in Combination as PDFs -

i have workbook many worksheets. save two-page pdfs, first page worksheet 1, , sec page worksheets 2-x. code allows me save individual pdfs each worksheet in workbook. wondering add together create this. can share advice?

thanks!

option explicit sub createpdffiles() dim ws worksheet dim fname string each ws in activeworkbook.worksheets on error resume next fname = "c:\folder\" & ws.name & "report" & format(date, "yyyy-mm-dd") & ".pdf" ws.exportasfixedformat _ type:=xltypepdf, _ filename:=fname, _ quality:=xlqualitystandard, _ includedocproperties:=true, _ ignoreprintareas:=false next ws end sub

you enumerating through worksheets , doing save within loop. why getting 1 pdf per worksheet. seek using workbook instead of activeworkbook.worksheets.

excel vba pdf worksheet

Comments

Popular posts from this blog

assembly - What is the addressing mode for ld, add, and rjmp instructions? -

vowpalwabbit - Interpreting Vowpal Wabbit results: Why are some lines appended by "h"? -

Is there a way to convert an HTML page styled with Bootstrap CSS into email-compatible html? -