Fix Extra Characters When Converting Word to PDF via VBA
Question details
The user needs to resolve an issue where converting a Word document to PDF using a VBA script results in unwanted additional characters in the output file.
- Product
- Microsoft Word
- Device & OS
- not provided
- Scenario
- Exporting a Word document to a PDF file programmatically via a VBA macro.
- Observed behavior
- Unexpected extra characters appear in the resulting PDF document. This issue started occurring after the software was updated to version 2503.
Before altering your VBA macro, toggle your document's formatting marks to verify if the extra characters are actually hidden text embedded within the original file.
Verify Hidden Text and Test Alternative Export Methods
Rule out document-level hidden characters and test standard manual export methods to determine if the issue is specific to your VBA script or the document itself.
Sometimes, recent Insider or Preview builds of Office introduce temporary rendering bugs. By testing native PDF export options, you can isolate whether the VBA method is at fault.
Click the 'Show/Hide ¶' button on the Home tab (or press Ctrl+Shift+8) to reveal any hidden formatting characters that might be mistakenly exporting to the PDF.
Navigate to File > Save As, choose PDF from the file format dropdown, and save the document. Open the resulting PDF to check if the extra characters appear.
Go to File > Print, select 'Microsoft Print to PDF' from your list of printers, and click Print. Compare this output with your VBA-generated file.
Review and Update Your VBA Export Parameters
Adjust your VBA macro to explicitly prevent document markup and hidden properties from being included in the fixed-format export.
Convert Word to PDF Seamlessly with WPS Office
If Microsoft Word preview builds are causing formatting bugs and inserting extra characters in your PDFs, switch to WPS Office. It provides a highly stable, lightweight, and free alternative with native, high-fidelity PDF conversion tools.
- 1. Open your document in WPS Writer: Launch WPS Office and open your .docx file directly.
- 2. Export to PDF: Go to the Menu, select 'Export to PDF', and click 'Export' for a clean, accurate conversion free of unwanted characters.

Frequently Asked Questions
Why do extra or hidden characters suddenly appear in my PDF exports?
This usually happens if the PDF export settings are accidentally configured to include document markup, or if a recent software update (like an Insider build) contains a bug that forces hidden text to render in the fixed layout.
Is Word version 2503 a stable release?
No, version 2503 is typically an Insider or preview build. If you experience bugs like formatting errors during VBA execution, it is highly recommended to switch back to the stable Current Channel.
How can I prevent VBA from exporting document properties or markup to PDF?
In your VBA script, ensure the ExportAsFixedFormat method has the 'Item' parameter specifically set to 'wdExportDocumentContent'. This instructs the application to exclude tracking changes, comments, and hidden markup.




