Hello all!
I have a macro that creates a PDF for each worksheet (see below) and it is working great.
However, it saves each pdf at a different zoom level.
I would like all the pdfs to open at a default zoom of 100%.
Any help would be much appreciated!
I have a macro that creates a PDF for each worksheet (see below) and it is working great.
However, it saves each pdf at a different zoom level.
I would like all the pdfs to open at a default zoom of 100%.
Any help would be much appreciated!
Code:
Option Explicit
Dim ws As Worksheet
Sub Print_PDF()
Application.DisplayAlerts = False
For Each ws In Sheets
If Not ws.Name = "Sheet1" Then
Sheets(ws.Name).Copy
ActiveWorkbook.Theme.ThemeColorScheme.Load ( _
"C:\Users\Microsoft\Templates\Document Themes\Theme Colors\Evergreen.xml" _
)
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
"C:\Coral\" & ws.Name & ".pdf", Quality:=xlQualityStandard, _
IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:= _
False
Application.Wait Now + TimeValue("00:00:03")
SendKeys "%{F4}", True
ActiveWindow.Close False
End If
Next
Application.DisplayAlerts = True
End Sub
Last edited by a moderator: