If I zoom in really far in Excel, and then goto File>Export>PDF, the content add-in zooms out really far. Alternatively, If I zoom out really far in Excel, and then use File>Export>PDF, the content add-in zooms in really far.
The same thing occurs when using the VBA code:
MySheet.Range("PDF_RANGE").ExportAsFixedFormat xlTypePDF, path, OpenAfterPublish:=True
This is clearly a Microsoft Office bug, but is there anything I can do to alleviate it?
Note: I am unable to test this in Excel2016, this may be an Excel2013 only issue.
Here’s a simple solution to alleviate some of the issues:
Dim scu As Boolean: scu = Application.ScreenUpdating Application.ScreenUpdating = False Dim zoom As Integer: zoom = ActiveWindow.zoom ActiveWindow.zoom = 100 Master.Range("PDF_RANGE").ExportAsFixedFormat xlTypePDF, path, OpenAfterPublish:=True ActiveWindow.zoom = zoom Application.ScreenUpdating = scu
Unfortunately the IE control still re-renders even when
Application.ScreenUpdating is set to
False, but hopefully these issues are fixed in later versions of Office.