A desktop publishing application from Microsoft that focuses on page layout and graphic design.
Hi,
The PowerShell script by Microsoft does provide a free way to batch convert all .pub files to PDF. However, the process does not just simply paste Convert-PubFileToPDF.ps1 -Filter "*.pub" -Recurse and then it runs. I will provide you the guidance in the most detailed and easiest way to follow:
- First, go to this page and download the sample script: Microsoft Publisher will no longer be supported after October 2026 | Microsoft Support.
- After that, go to C:\ and create a new folder named
PubConvert> copy the downloaded file (namedConvert-PubFileToPDF.ps1) into this folder - Then put all your .pub files into a single folder, for example:
PublisherFilesin C:\ like this
After that, open Windows PowerShell and follow this instruction:
- Paste
cd C:\PubConvert> press Enter - Paste
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass> Enter > if you see a prompt asking for confirmation, press Y and Enter - Paste
Start-Transcript -Path "C:\PubConvert\PublisherConversionLog.txt"> Enter - Paste
.\Convert-PubFileToPDF.ps1 -Filter "C:\PublisherFiles\*.pub" -Recurse> Enter - Wait until it finished and returns a message "Converted xxx files with xxx errors" > paste
Stop-Transcript> Enter and close PowerShell. - This is a sample PowerShell interface if everything is done properly
- Then go to the
PublisherFilesfolder and you will see all your .pub files are converted to PDFs.
You can give it a try and let me know whether it works. If you have any other questions, please feel free to reach out again in the comments on this post. I'm happy to assist you further.
Thank you for your understanding and cooperation. I'm looking forward to your reply.
If the answer is helpful, please click "Yes" and kindly upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.