I have the following code:
I need to specify that I want the PDF export to be done in a vertical orientation, how can I do that?
VBA Code:
Private Sub SaveAsPDF_Axis()
Dim Counter As Integer, FindFileType As Integer, SaveAsFileName As String
Select Case MachineName
Case "A4", "A8.1", "A8.2", "A8.3", "A12.1", "A12.2", "A12.3", "A20.1", "A20.2"
SaveAsFileName = "AC_Offset" & "_" & MachineName & "_" & Format(Now, "dd.mm.yyyy")
With Application.FileDialog(msoFileDialogSaveAs)
FindFileType = 0
For Counter = 1 To .Filters.Count
If InStr(VBA.UCase(.Filters(Counter).Description), "PDF") > 0 Then FindFileType = Counter
Next
.Title = "Save File As PDF"
.InitialFileName = SaveAsFileName
.FilterIndex = FindFileType
If .Show Then
Sheets("Final").Range(Cells(1, 1), Cells(68, 41)).ExportAsFixedFormat Type:=xlTypePDF, _
Filename:=.SelectedItems(1), _
Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=False
.LeftMargin = Application.InchesToPoints(0)
.RightMargin = Application.InchesToPoints(0)
.BottomMargin = Application.InchesToPoints(0.2)
.TopMargin = Application.InchesToPoints(0.2)
End If
End With
End Select
End Sub
I need to specify that I want the PDF export to be done in a vertical orientation, how can I do that?