11/5/2023 0 Comments Excel to pdf page converter![]() XWbk.ExportAsFixedFormat Type:=xlTypePDF, Filename:=xRPath & xbwname & ".pdf"ģ. Xbwname = Replace(xStrFile1, ".xlsm", "_pdf") Xbwname = Replace(xStrFile1, ".xlsx", "_pdf") Xbwname = Replace(xStrFile1, ".xls", "_pdf") Set xWbk = Workbooks.Open(Filename:=strPath & xStrFile1) Title = "Please select a destination folder to save the converted files:" Set xRFD = Application.FileDialog(msoFileDialogFolderPicker) Title = "Please select the folder contains the Excel files you want to convert:" Set xSFD = Application.FileDialog(msoFileDialogFolderPicker) VBA code: Convert multiple workbooks to PDF files at once Sub ExcelSaveAsPDF() Click Insert > Module, and paste the following code in the Module Window. ![]() Hold down the ALT + F11 keys to open the Microsoft Visual Basic for Applications window.Ģ. If there are hundreds of Excel files need to be converted, the above method will be troublesome, here, I will talk about a VBA code for converting multiple workbooks to PDF files at once, please do with the following steps:ġ. Tips: If you have multiple workbooks need to be converted, please apply above steps to save the workbooks to PDF files one by one.Ĭonvert multiple workbooks to PDF files with VBA code at once And then click OK > Save, this whole workbook has been saved as PDF file format. Then, in the popped out Options dialog box, check Entire workbook, see screenshot:Ĥ. Click File > Save As, and in the Save As dialog box, please specify a folder for saving the new file, then select PDF from the Save as type drop down list, and then, click Options button, see screenshot:ģ. Launch you workbook that you want to convert to PDF format.Ģ. ![]() Normally, the Save As feature in Excel can help you to save the entire workbook to a PDF file, please do as this:ġ. Convert multiple worksheets from a workbook to separate PDF files with a handy featureĬonvert multiple workbooks to PDF files with Save As function one by one.Convert multiple worksheets from a workbook to separate PDF files with VBA code.Convert multiple workbooks to PDF files with a powerful feature.Convert multiple workbooks to PDF files with VBA code at once.Convert multiple workbooks to PDF files with Save As function one by one.But how do you convert multiple workbooks to PDF files at the same time in Excel? In Excel, we can save an Excel file as PDF file by using Save As function. Sometime, you need to convert your Excel files to PDF files, so that they cannot be modified by others. How to convert multiple workbooks or worksheets to PDF files at once in Excel?
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |