Excel VBA can't save as pdf anymore
Copy link to clipboard
Copied
After years working, since 2025-01-06 my Excel VBA macros saving a worksheet as pdf get "run-time Error 1004 - Document not saved. Maybe the file is open or troubles when saving". The stopping command is
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=fn, Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _
:=False, OpenAfterPublish:=False
The worksheet copied with these macros on a second PC still works smoothly. The two PCs are updated and aligned:
Windows 10 Pro (upd KB5048652)
Microsoft® Excel® for Microsoft 365 MSO (Version 2412 Build 16.0.18324.20092) 64 bit
VBA 7.0.1
Adobe Acrobat Pro v. 2024.005.20320 (un- and re-installed)
On both, however, also exporting the pdf manually with the PDFMaker plugin is VERY long and troubled, Excel hangs for minutes and the worksheet is forced-closed and re-opened at the end by the PDFMaker plugin. Last, manually Saving As .pdf in the File dialog works smoothly in the second PC, while gives the same "Document not saved" msg in the "bugged" one.
Did anyone meet a similar bug?
Copy link to clipboard
Copied
I've moved this from the Using the Community forum (which is the forum for issues using the forums) to the Acrobat forum so that proper help can be offered.
Scroll down here to see a list of the forums:
https://community.adobe.com/
Copy link to clipboard
Copied
Sorry, I'm new... Thank you
Copy link to clipboard
Copied
This looks like a Microsoft issue, not an Adobe one. That command doesn't use Acrobat to generate the file, as far as I can see.
Copy link to clipboard
Copied
Many thanks, you're probably right. Actually I can't say which piece of software is involved, I thought that maybe the Adobe plugin PDFMOfficeAddin.dll could play some role. And every other output format but .pdf works normally in the VBA macros.

