flashnomad.blogg.se

Change print area in excel 2010
Change print area in excel 2010










change print area in excel 2010
  1. #Change print area in excel 2010 pdf
  2. #Change print area in excel 2010 code

You will find the selected range of cells saved into a PDF file. Enter the name you want to save the new PDF with and click OK.You will see a prompt asking you to enter a name for the new PDF. Select the name SaveSelectionToPDF from the list of macros displayed. Click on Macros, under the Developer tab.Now go to your worksheet and select the range of cells that you want to save to PDF (cells A1:F18 in our example).

#Change print area in excel 2010 code

  • Your code is now ready to run and use whenever needed.
  • Copy the code given above and paste it into the module window.
  • Once your VBA window opens, Click Insert->Module.
  • From the Developer Menu Ribbon, select Visual Basic.
  • To apply the above script, to your dataset, follow these steps: Rng.ExportAsFixedFormat Type:=xlTypePDF, _ Pdfpath = ThisWorkbook.Path & "\" & newpdfname Newpdfname = Application.InputBox("Please Enter a name for the new PDF") The following code lets you save a selection to PDF in the same folder as the original Excel file: Sub SaveSelectionToPDF() In such cases, this method works really well and can reduce the amount of time you spend clicking and exporting.īy using VBA, you can get multiple selections saved in quick succession. There may be cases where you need a number of selections saved as separate PDFs in a single folder. Method 3: Saving a Selection to PDF using VBA
  • Finally, click on Publish to save the selection and close the Publish As dialog box.
  • Check or uncheck the options that you need. You will see more options at the bottom of the Publish As dialog box, like options for optimizing your PDF file and opening the PDF file after publishing.
  • Under the ‘Publish what’ section, select the radio button next to the ‘Selection’ option.
  • In the field next to ‘ Save As Type’, you will find the ‘PDF’ option already selected.
  • If not, then leave the filename as it is.

    change print area in excel 2010

  • In the field next to ‘ File Name’, type the name you want to give the new file if you want to save the PDF with a different name.
  • Select the folder you want to save the PDF in.
  • This will open the Publish As dialog box.
  • On the right-hand side, you will see a button that says ‘ Create PDF/ XPS’.
  • change print area in excel 2010

    Select Export from the options on the left sidebar.It takes advantage of Excel’s built-in PDF converter. This method is suitable for you if you are using Excel versions 2007 and higher. Method 2: Saving a Selection to PDF using the Publish As Dialog Box The good thing, however, is that this is just a copy, so your original Excel sheet remains preserved the way it was. Note: Once you have converted to PDF, you cannot revert it back into an Excel sheet. If you had checked the box next to ‘ Open file after publishing’, Excel will open your saved selection in your default browser or PDF viewer. Finally, click on Save to save the selection and close the Save As dialog box.You will see more options at the bottom of the Save As dialog box, like options for optimizing your PDF file, and opening the PDF file after publishing.Click OK to close the Options dialog box.Under the ‘ Publish what’ section, select the radio button next to the ‘Selection’ option.This will further open a new dialog box for you to enter your options.Click on the Options button (located towards the bottom of the dialog box).From the dropdown menu that appears, select PDF.In the field next to ‘ Save As Type’, click on the dropdown arrow.In the field next to ‘ File Name’, type the name you want to give the new file, if you want to save the PDF with a different name. This will open the Save As dialog box.If you are asked which folder you want to save to, then select the relevant folder.Select Save As from the options on the left sidebar (if you’re on older versions of Excel, select Save As from the File menu).In our example, we will select the range A1:F18. Select the range of cells that you want to save in the PDF file.To save a selected range of cells to PDF, here are the steps that you need to follow: This is a very commonly used method as it is simple and can usually be applied to any Excel version. Method 1: Saving a Selection to PDF using the Save As Dialog Box We will apply the above three methods to save only the shaded portion of the sheet to PDF. Throughout this tutorial, we will be using the following dataset. Method 3: Saving a Selection to PDF using VBA.Method 2: Saving a Selection to PDF using the Publish As Dialog Box.Method 1: Saving a Selection to PDF using the Save As Dialog Box.












    Change print area in excel 2010