Excel Vba Print Multiple Worksheets To Pdf
I have a reporting spreadsheet that grabs some data from a database and forms three sheets of summary report information. I want to run the spreadsheet automatically from the command line, and have it automatically save all three reporting sheets as a PDF file(s). At first I thought I could have a VBA macro on the sheet do this by a series of 'print as PDF', but that requires an intermediary interactive dialog box to specify the output file name. Then I find that I can just save as pdf, and the macro can set the output file name. However this creates three separate files, and I have to then later put them together externally to merge them.
If you have multiple individual sheets within your Excel workbook, when you try to create a PDF and choose to print the Entire Workbook, each sheet will be saved as a. Can I use Excel to print several sheets in a single PDF? Open the Excel Workbook. Navigate to the PDF. How do I create a single PDF document from multiple.
Excel Vba Print Multiple Pages
(It is odd that save as pdf only saves one sheet, where other save modes seem to save the entire workbook.) Yes, there are tools for merging the three files later, but I want to know if there is some easy way to get Excel to save multiple sheets together as one pdf file. I print now by a series of things like: ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF.
Update fs2004 gps. Could I do instead a single statement something like (pseudo-code): ThisWorkbook.Sheets(1,2,3,4).ExportAsFixedFormat Type:=xlTypePDF.
See More On Stackoverflow
I am trying to print/publish multiple sheets from Excel workbook, but in a specific order. I use the same code used here but it is not printing in the order I inputted into my array and alternatively is printing from leftmost sheet to the rightmost sheet. I would like to print the sheets in a specific order. I selected the order that I wanted to print, however, it printed from left most sheet and going to right in the way they were in the workbook. How can I make them print in the order that I inputted in the array. I selected ThisWorkbook.Sheets(Array('GIT 100', 'GIT 399', 'CheckList GIT 400', 'TCCC', '4.1')).Select But I got '4.1','CheckList GIT 400','GIT 399','TCCC','GIT 100' as the published document.
Give More Feedback
Any help would be much appreciated.