![]() ![]() This is how you can convert the range A1: F8 in excel to PDF. STEP 9: Select the location and press Save. STEP 8: In the dialog box, type the required range – A1: F8. STEP 7: Select the Macro PrintSelectionToPDF that is located in All Open Workbooks and click Run. STEP 6: Press Alt + F8 to open the Macro dialog box. STEP 5: In the Save as dialog box, choose Excel macro-enabled workbook from the drop-down list and click the Save button. STEP 4: Press Ctrl + S to save the file and then click No. STEP 3: Copy-paste the VBA code from above into here. STEP 2: Right Click on the sheet name and then select Insert > Module. STEP 1: Press Alt + F11 to open VBA Editor. MsgBox “Unable to create PDF file”, vbOKOnly, “No File Selected”įollow the steps below to use this VBA code to Export selection to PDF: ![]() MsgBox “PDF file has been successfully created: ” & strFile Rng.ExportAsFixedFormat Type:=xlTypePDF, Filename:=file, Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=False ‘Start the export process of the selected range ‘We open a save prompt for the username to select the location and filenameįile = Application.GetSaveAsFilename(InitialFileName:=strFile, FileFilter:=”PDF Files (*.pdf), *.pdf”, Title:=”Select location for the PDF file”) StrFile = ThisWorkbook.Path & “\” & strFile ‘Create the filename with the path – the default filename is ExceltoPdf.pdf Set rng = Application.InputBox(“Please select a range”, “Get Range”, Type:=8) ‘Check first if a range has been selected This VBA will prompt you to provide the range you wish to export and then select the location, to automatically export Excel to PDF. You can also use VBA code to publish a range in Excel into PDF. STEP 4: This will add E-mail as PDF Attachment to Quick Access Toolbar. STEP 3: This will add E-mail as PDF Attachment under Customize Quick Access Toolbar. STEP 2: In the Excel Options dialog box, select Quick Access Toolbar > E-mail as PDF Attachment > Add. If you want to attach an Excel file as PDF in an email, you can add it to the Quick Access Toolbar (QAT).įollow the steps below to email PDF as QAT: #4 – Email PDF using Quick Access Toolbar ![]() STEP 5: Simply click on the icon, select the file location you want to save it at and click on Publish. STEP 4: This will add Publish as PDF/XPS to the Quick Access Toolbar. STEP 3: This will add Publish as PDF under Customize Quick Access Toolbar. STEP 2: In the Excel Options dialog box, select Quick Access Toolbar > Publish as PDF or XPS > Add. STEP 1: Right Click on the QAT to customize it. Follow the steps below to add Publish as PDF option to the QAT: If converting Excel to PDF is a regular task for you, you can add it to the Quick Access Toolbar (QAT). STEP 3: In the Publish as PDF or XPS dialog box, click on Publish. STEP 2: Click on Export > Create PDF/XPS Document > Create PDF/XPS Document button. The Export option in Excel will provide you with a quicker way to save your file as PDF. This will save you Excel Table in PDF format. To publish the entire sheet, click on Active Sheet(s), and to publish the workbook click on the Entire Workbook. This will help you to publish only what you have selected on the sheet. STEP 7: In the Options dialog box, Go to Publish what section and click on Selection. STEP 6: Click on the Options button to customize the PDF file you want to create. STEP 5: Under Save as type dropdown, select PDF. See also Convert Selected Range into an Image Using Macros In Excel Make sure to download the Excel Workbook below and follow along: This article will cover the following two conversion methods in detail: Similarly, you can easily create tables from the PDF document using Excel. xlsx file type.īut you can easily convert Excel to PDF format. By default, an Excel Workbook is saved as a. They are used when you need to save a file without modification so that it can be easily shared and printed. PDF files are a widely used format for electronic documents. This tutorial will cover exactly that – How to Convert Excel to PDF or PDF to Excel.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |