I am trying to write VBA code to automitically print to an ADOBE file.
I am somewhat familiar with VBA, but most of my experience is with Active Controls and User Menus and I have VERY limited experience with Adobe. I am saying this, because I have searched for examples online, and cannot get any of them to work. Probably because I am not properly defining the post script files etc...
One example:
Private Sub CommandButton1_Click()
Dim oSheet As Worksheet
Dim oPDF As PdfDistiller ( I get an error here)
Dim TmpPSFile As String
Dim PDFFile As String
Set oSheet = ActiveSheet
Set oPDF = New PdfDistiller
TmpPSFile = "c:\TmpPSFile.ps"
PDFFile = "c:\" & Left(ActiveWorkbook.Name, Len(ActiveWorkbook.Name) - 4) & "_" & ActiveSheet.Name & ".pdf"
oSheet.PrintOut copies:=1, preview:=False, _
ActivePrinter:="Acrobat Distiller", printtofile:=True, _
collate:=True, PrToFileName:=TmpPSFile
oPDF.FileToPDF TmpPSFile, PDFFile, ""
Kill TmpPSFile
End Sub
I am using Adobe Acrobat/Distiller 8. Notes say to "Do not send fonts to Distiller" Option, but I cannot find that option within Distiller.
I am just looking for something very simple. I print about 20-25 reports out of my macro enabled worksheets a day - and just have to convert so supervisors can open with their IPADS.
Thank You,
Todd
Bookmarks