Written by Allen Wyatt (last updated November 6, 2021)
This tip applies to Word 2007, 2010, 2013, 2016, 2019, and Word in Microsoft 365
Jim often uses Word's "Save a Copy" command to convert a document to a PDF. There are 16 choices in Save a Copy, including one to save in Word 97 format. Jim wonders if there is a way to remove the file formats that he'll never use.
The contents of the dialog box seem to be hard-coded, with no way to adjust what is displayed. You can, however, use a macro-based approach to adjust how the Save a Copy commend works.
First, however, it helps to understand a bit about the Save a Copy command. It is easy to think that the command is the same as the Save As command, and it is—to a degree. Interestingly, if you click on the File tab of the ribbon, you'll see only two save-related commands displayed: Save and Save As. However, if you customize the ribbon or the Quick Access Toolbar, there are a plethora of save-related commands that can be added, including Save a Copy.
If you add the Save a Copy command to your ribbon or QAT, it acts very much like simply clicking on Save As; both commands display the same Save As dialog box. However, the two commands call different macro code in order to execute. You can verify this by adding the following code to your Normal template:
Sub FileSaveACopy() With Dialogs(wdDialogFileSaveAs) .Format = wdFormatPDF .Show End With End Sub
With this macro in place, clicking on the Save a Copy tool displays the Save As dialog box, which it normally does, but it has the PDF format automatically chosen in the dialog box. If you, instead, choose the Save As command (or simply press F12), then the same Save As dialog box is displayed, but the PDF format is not chosen as the default.
The upshot is that if you want the Save a Copy command (and only that command) to use the PDF format as its default, then using the above macro will work just fine. If you want, however, both Save a Copy and Save As to use PDF as the default, you will need two macros—the one above and the following variation:
Sub FileSaveAs() With Dialogs(wdDialogFileSaveAs) .Format = wdFormatPDF .Show End With End Sub
The only difference in this variation is the name of the macro itself.
I should also note that Microsoft, in its typical fashion, has muddied the waters even more. If you are using Word as an app on a tablet or your phone, there is not a "Save As" command available from the File tab of the ribbon. Instead, displaying the File tab indicates that there is a Save and a Save a Copy command—in other words, "Save As" has been replaced with "Save a Copy" in the app. It is unclear, however, whether this is simply a wording change, or whether the underlying code calls the SaveAs command or the SaveACopy command.
There is another approach that you can follow that may be easier—you could create the entire PDF using a macro. The following short macro converts the document to a PDF file and saves it in the same folder as the Word document. (This means that you should only run this macro on a document that has been previously saved.)
Sub SavePDFCopy() Dim sName As String With ActiveDocument sName = .Path & "\" & .Name sName = Left(sName, InStr(sName, ".") - 1) & ".pdf" End With ActiveDocument.ExportAsFixedFormat OutputFileName:=sName, _ ExportFormat:=wdExportFormatPDF End Sub
If the macro is placed on the QAT or the ribbon, then there is only one click needed to convert the current document to PDF and save the result.
Note:
WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (10125) applies to Microsoft Word 2007, 2010, 2013, 2016, 2019, and Word in Microsoft 365.
Comprehensive VBA Guide Visual Basic for Applications (VBA) is the language used for writing macros in all Office programs. This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Check out Mastering VBA for Office 2010 today!
If you need to move between two different folders quite regularly in the Open dialog box, you'll find the technique ...
Discover MoreIf you use a macro to create and work with text files, you can find out the length of those files using a simple command. ...
Discover MoreNeed to combine quite a few text documents? A macro may be the easiest way to stuff them all into a single Word document.
Discover MoreFREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
2021-11-12 05:43:43
Ken Endacott
Luana,
Export > Create PDF Document produces a 311 KB file from the test Word document but gives the same problem with images as SaveAs. I have no explanation as to why there is 58KB difference in file sizes.
If the Word document doesn't contain images that have text within the image then the result is satisfactory.
2021-11-11 09:27:36
Luana
@Ken,
Just wondering what the results were if you used the File, export, create PDF function? I use it regularly for documents I want electronically signed, but I don't generally have a lot of graphics.
2021-11-06 22:08:42
Ken Endacott
There are a number of ways to convert a Word document to pdf and they each produce different results. The seven page test document contained several images and the file size was 330KB.
1.Word’s SaveAs. The pdf file size was 369KB. The quality was terrible - see below for discussion.
2.Word’s Print using Microsoft Print to PDF. The pdf file size was 1126 KB and the quality was good.
3. Using the macro SaveAsPdf. The quality was poor but there are options that could be added.
4. On-line convert using the Adobe web site. File size 392KB, quality terrible.
5. On-line convert using the third party application “PDF Converter Kit”. File size 19MB and the quality was excellent. However took 20 minutes and ended up with a file size of 90MB that the Adobe reader compressed to 19MB.
The problem with quality was that the images contained some text and the conversion programs tried to use OCR to read the text which produced unacceptable results. With those programs there was no option to turn off OCR. The gold standard for conversion is Adobe Pro that has an option to turn off OCR however it is requires a subscription
In summary, If your document has images and all you want to do is produce a printable pdf file then use Word’s Print with the Microsoft Print to PDF option.
Got a version of Word that uses the ribbon interface (Word 2007 or later)? This site is for you! If you use an earlier version of Word, visit our WordTips site focusing on the menu interface.
Visit the WordTips channel on YouTube
FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2024 Sharon Parq Associates, Inc.
Comments