D
Daniel
I cannot get the distiller function to work in MS Word. If I have nothing in
the third argument field (strJobOptions) when calling FileToPDF, the macro
will hang. But I cannot find any references in Adobe Acrobat Distiller API
reference of what strJobOptions are required. When I tried to use "\N" or
"\q" option, the macro will run via the FileToPDF function without converting
the ps file to pdf. I have no problem in using a similar function in excel to
create PDF file using macro. My objective in this Word macro is to enable the
user to quickly print the current word file to PDF and then send the PDF file
to a FTP site. Now I am clueless of what to do next. Can anyone help ?
Following is my Word macro.
Dim myPDF As New ACRODISTXLib.PdfDistiller
Set fs = CreateObject("Scripting.FileSystemObject")
ActivePrinter = "Adobe PDF"
Application.PrintOut OutputFileName:="c:\temp\logbook.ps",
Range:=wdPrintAllDocument, Item:= _
wdPrintDocumentContent, Copies:=1, Pages:="",
PageType:=wdPrintAllPages, _
ManualDuplexPrint:=False, Collate:=True, Background:=True,
PrintToFile:= _
True, PrintZoomColumn:=0, PrintZoomRow:=0, PrintZoomPaperWidth:=0, _
PrintZoomPaperHeight:=0
myPDF.FileToPDF "c:\temp\logbook.ps", "c:\temp\logbook.pdf", ""
' fs.DeleteFile "c:\temp\logbook.ps"
the third argument field (strJobOptions) when calling FileToPDF, the macro
will hang. But I cannot find any references in Adobe Acrobat Distiller API
reference of what strJobOptions are required. When I tried to use "\N" or
"\q" option, the macro will run via the FileToPDF function without converting
the ps file to pdf. I have no problem in using a similar function in excel to
create PDF file using macro. My objective in this Word macro is to enable the
user to quickly print the current word file to PDF and then send the PDF file
to a FTP site. Now I am clueless of what to do next. Can anyone help ?
Following is my Word macro.
Dim myPDF As New ACRODISTXLib.PdfDistiller
Set fs = CreateObject("Scripting.FileSystemObject")
ActivePrinter = "Adobe PDF"
Application.PrintOut OutputFileName:="c:\temp\logbook.ps",
Range:=wdPrintAllDocument, Item:= _
wdPrintDocumentContent, Copies:=1, Pages:="",
PageType:=wdPrintAllPages, _
ManualDuplexPrint:=False, Collate:=True, Background:=True,
PrintToFile:= _
True, PrintZoomColumn:=0, PrintZoomRow:=0, PrintZoomPaperWidth:=0, _
PrintZoomPaperHeight:=0
myPDF.FileToPDF "c:\temp\logbook.ps", "c:\temp\logbook.pdf", ""
' fs.DeleteFile "c:\temp\logbook.ps"