In today’s post, we are glad to show you 2 easy ways to save a selection in your Word document as a PDF file.
Now and then, we are likely to save a final document as PDF file to prevent it from accidental change. There are also cases where just a part of document needs to be saved in PDF file. Luckily, there are ways out already. Read on to see what you can find.
Method 1: Use the “Save As” Command
First there is the built-in command which can achieve the expected result.
- At first, select a range of texts you would like to export.
- Next click “File” tab.
- Then click “Save As” to open the “Save As” window.
- Now in the “Save As” window open, enter the new file name first.
- Then choose “PDF” as saving type.
- And don’t forget to choose a storage location.
- Next click “Options” to open the same name dialog box.
- Select “Selection” under “Page range” and click “OK” then.
- Last but not the least, click “Save”.
Method 2: Run Word Macro
- First and foremost, select texts and click “Developer” tab then the “Visual Basic” to open VBA editor. And another way is to press “Alt+ F11” instead.
- Next go to click “Normal”.
- Then click “Insert” tab and choose “Module” on its drop-down menu.
- Double click on the module to have the coding space on the right side.
- And paste the following codes there:
Sub SavePartsOfDocumentToPDF() Dim strFileName As String Dim strFolder As String strFolder = InputBox("Enter folder path here:") strFileName = InputBox("Enter file name here:") Selection.ExportAsFixedFormat OutputFileName:= _ strFolder & "\" & strFileName, ExportFormat:= _ wdExportFormatPDF, OpenAfterExport:=True, OptimizeFor:= _ wdExportOptimizeForPrint, ExportCurrentPage:=False, Item:= _ wdExportDocumentContent, IncludeDocProps:=True, KeepIRM:=True, _ CreateBookmarks:=wdExportCreateNoBookmarks, DocStructureTags:=True, _ BitmapMissingFonts:=True, UseISO19005_1:=False End Sub
- Next click “Run”.
- First there will be the input box asking you to enter the folder path. Finish it and click “OK”.
- Then here is another input box requiring you to enter file name. Do it and click “OK”.
The result is as same as that of method 1. The strength of method 2 is you no longer need to set all options in “Save As” window.
Solution to Fix Document Errors
Errors keep occurring in Word. Sometimes, they don’t affect our document integrity. And sometimes, they do. Then the only way out is to get hold of an efficient tool to repair docx. A recovering tool should get involved as soon as possible so as to retrieve the trapped data as much as it can.
Vera Chen is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including recover Excel and pdf repair software products. For more information visit www.datanumen.com