
Microsoft has announced that support for Microsoft Publisher ends on 1 October 2026, and Microsoft 365 subscribers will lose access to the application at that time.
I’ve accumulated around 850 Microsoft Publisher (.pub) files over the years. While I no longer use Publisher for new work, I didn’t want to lose the ability to view or print those documents once Publisher disappeared.
To solve the problem, I developed a simple PowerShell script that automates Microsoft Publisher’s own PDF export.
I’ve shared it in a GitHub repo for anyone who needs to do the same.
How it works
The PowerShell script:
- Prompts you to choose a folder.
- Searches that folder and all subfolders for
.pubfiles. - Opens each publication in Microsoft Publisher.
- Exports it to PDF.
- Saves the PDF beside the original file.
- Skips files that have already been converted.
- Produces a log file showing what was converted and any files that failed.
For me, it converted hundreds of Publisher files in one go and gave me a PDF archive that will remain accessible long after Publisher has gone.
Getting started
The script requires:
- Windows
- Microsoft Publisher installed
- Windows PowerShell
- Download the script from GitHub.
- Save it to
C:\. - Open Windows PowerShell.
- Run:
& "C:\Convert-Publisher-to-PDF-with-folder-picker.ps1"
If PowerShell reports that running scripts is disabled, run:
Set-ExecutionPolicy -Scope Process Bypass
Then run the script again.
A folder selection dialog will appear. Choose the folder containing your Publisher files and the script will do the rest.
Source code
The script is freely available under the MIT License on this GitHub repository: batch-convert-publisher-to-pdf.
I hope it’s useful to anyone else who is trying to preserve a collection of Microsoft Publisher documents before the application reaches the end of its life.
Thank You! The script from MS that is supposed to do this doesn’t work. Several other scripts from others don’t work. I just spent PILES of credits on Chat-GPT 5.5 (Tera)? and I at least learned more about PowerShell Scripts, but nothing worked there either. I gave the Chat-GPT your script and it said that it probably wouldn’t work either as it was quite similar to what it was doing. Well, your worked! It even allows me to use an item selector to tell where the files are to be found (I have them in lots of differing folders). Right now I dumps the PDF’s right where the PUB files are, which I can handle (it’s easy enough to just transfer the PUB files to another folder by hand). So, thank you! I’m a retired pastor and all of the churches I’ve served in have used Publisher for bulletins and such. I’ll be passing on this script to them (with credit to you).
Hi Michael, I’m so glad that you managed to save your Publisher files. My use case was much the same: loads of church-related magazines, bulletins, etc.
Thank you! I had a script which had errors in it (thanks, AI) but your code helped me find and fix them. I’ve now converted 424 files. Like you, I go back a long way with Publisher, back to Windows 3.1. It’s a shame we can no longer edit the files. I have a standalone license, but I don’t trust that Microsoft won’t put a stray bullet into it.
Well done, Mark! Glad I could help.
I wish I had a standalone copy of Publisher, but I’m actually quite enjoying learning Affinity Layout.