A desktop publishing application from Microsoft that focuses on page layout and graphic design.
Hi Head Teacher,
The PowerShell script supports the -Recurse parameter, so it can search a selected folder and all its subfolders for Publisher .pub files. You do not need to move all the files into a single folder.
For files stored in SharePoint, please note that the script works with file-system paths rather than a SharePoint web URL. You would normally need to:
- Sync the relevant SharePoint document library to a Windows computer using OneDrive.
- Make sure the Publisher files are available locally and not only stored online.
- Run the script against the synced library’s root folder with [-Recurse].
- Confirm that the account running the script has permission to open the files and save the resulting PDFs.
.\Convert-PubFileToPDF.ps1 -Filter "C:\Path\To\SyncedLibrary\*.pub" -Recurse
``
Microsoft Publisher must remain installed and licensed on the computer performing the conversion. The script is designed to continue if an individual file fails and report which files were converted or encountered an error. If a PDF with the same name already exists, that file will not be overwritten.
Because your library contains many folders and documents, I recommend testing the process on a small synced folder first. This will help you verify the PDF output, permissions, file paths, available disk space, and SharePoint synchronization behavior before processing the entire shared area.
For more information, please refer to the following link:
- Microsoft Publisher will no longer be supported after October 2026
- Save As or convert a publication to .pdf or .xps using Publisher
I hope the information I shared earlier was somewhat helpful in addressing your issue. If you have any further questions or updates, please don’t hesitate to share.
Kind regards,