Vous êtes sur la page 1sur 2

Control Distiller from VB/VBA -- The PowerPoint FAQ http://www.rdpslides.com/psfaq/FAQ00053.

htm

Supercharge your PowerPoint Productivity with

Click here to learn how

Control Distiller from VB/VBA

Home >> Automated PDF


Example EPS
PS/PDF FAQ printing and
using PDFMark
Main page manipulation

If you want to invoke Distiller from VB/VBA, read this PDF


from Brook House Digital Publishing Solutions, where you'll
also find BatchPrintPDF, PDF Assistant and several
interesting-looking plug-ins. pdf-tools.com -
PDF API's
If that link doesn't work, try this instead View, print, convert,
merge, etc. COM
There's also this, from "Jabba the Nut" on the Adobe User to API, C, Java
User forums, which is quite similar to the approach outlined in interfaces
the Brookhouse document above: www.pdf-tools.com

I have used the following VB code to print an Excel range to


an Adobe Acrobat .PDF file. The steps to accomplish this are
as follows: Pdf Rip
1. Print the range to a postscript file using Acrobat Distiller DaylightRIP gets
2. Convert postscript file to .PDF using Acrobat Distiller API. your colors right
without hassle and
Make sure that you uncheck the "Do not send fonts to easy to use.
Distiller" option in the Distiller properties. You do this by www.scp.de
entering the Distiller properties>>General Tab>>Printing
Preferences>>Adobe PDF Settings and uncheck the "Do not
send fonts to Distiller" option. You will get an error if you don't
do this. Foxit PDF Creator
Print documents to
In the Excel Visual Basic Editor, make sure you include a searchable PDFs
reference to Acrobat Distiller. Fast and easy. All
Here is the code.... languages. $35
www.foxitsoftware.com
Private Sub CommandButton1_Click()
' Define the postscript and .pdf file names.
Dim PSFileName as String Convert PDF to
Dim PDFFileName as String Excel
PSFileName = "c:\myPostScript.ps" Convert PDF to
PDFFileName = "c:\myPDF.pdf" Excel, simple and
Accurate - Free
' Print the Excel range to the postscript file Trial!
Dim MySheet As WorkSheet www.cogniview.com
Set MySheet = ActiveSheet
MySheet.Range("myRange").PrintOut copies:=1,
preview:=False, ActivePrinter:="Acrobat Distiller",
printtofile:=True, collate:=True, prtofilename:=PSFileName
' Convert the postscript file to .pdf
Dim myPDF As PdfDistiller
Set myPDF = New PdfDistiller
myPDF.FileToPDF PSFileName, PDFFileName, ""
End Sub
Last updated 9/9/2005 10:31:30 AM

1 de 2 17/12/2007 1:45
Control Distiller from VB/VBA -- The PowerPoint FAQ http://www.rdpslides.com/psfaq/FAQ00053.htm

Content authoring & site maintenance by

Friday - The Automatic FAQ Maker

2 de 2 17/12/2007 1:45

Vous aimerez peut-être aussi