Share via

"Document not saved" error when creating PDF from Excel 2007

Anonymous
2011-11-21T17:42:51+00:00

I have VBA code similar to this that I use in multiple workbooks: 

ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=FName, _

Quality:=xlQualityStandard , IncludeDocProperties:=True, _

IgnorePrintAreas:=False, OpenAfterPublish:=False

FName is a string variable containing the path and the filename.  This code worked perfectly until two weeks ago, when it suddenly stopped working and started generating a "Document not saved" error.  This has to relate to some upgrade our IT department did, but I have no idea what.  We're using Office 2007 under Windows XP.  Anyone have any ideas what could have changed to cause this code to stop working?

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Anonymous
    2011-11-28T14:20:49+00:00

    Thanks, but these address problems saving a workbook.  The VBA code I'm using is attempting to save as a PDF.  I can manually save without problems, but the VBA code fails with the "Document not saved" error.

    Was this answer helpful?

    0 comments No comments