I have created a macro to export the sheet template to PDF:
ActiveWorkbook.Sheets(\"Sheet2\").ExportAsFixedFormat Type:=xlTypePDF, Filename:= _ ActiveWorkbook.
I also got this error and tried doing it manually to work out the problem.
Turns out that you can't save as PDF when the filename (including path) is longer than 218 characters.