Heres is the code. I am also having trouble setting the page size. For 34 x 22
Option Explicit
Dim swApp As SldWorks.SldWorks
Dim Model As ModelDoc2
Dim stDprinter As String
Sub main()
Set swApp = CreateObject("SldWorks.Application")
Set Model = swApp.ActiveDoc
Dim ps As PageSetup
Set ps = Model.PageSetup
ps.Orientation = 2 ' 1=Portrait '2 = Landscape
ps.PrinterPaperLength = 34 / 0.01
ps.PrinterPaperWidth = 22 / 0.01
ps.ScaleToFit = True
stDprinter = "Adobe PDF"
Dim pageArray(0) As Long
pageArray(0) = 0
Dim vPageArray As Variant
vPageArray = pageArray
Dim copies As Long
copies = 1
Dim collate As Boolean
collate = True
' Print to default printer
Model.Extension.PrintOut2 vPageArray, copies, collate, "stdprinter", ""
End Sub