Hi,
I need to convert docs in multi format, maybe Word, EXCEL, TIFF, PPT etc, to PDF files in batch mode with VB program.
Can anybody help me?
Thanks,/Al
Printable View
Hi,
I need to convert docs in multi format, maybe Word, EXCEL, TIFF, PPT etc, to PDF files in batch mode with VB program.
Can anybody help me?
Thanks,/Al
Wouldn't you just print your file to a PDF file using Acrobat Writer? That's how Acrobat Writer works, like a printer. Is it more complex than that?
Code:For Each ptr In Printers
If ptr.DeviceName = "AcrobatPDFWriter" Then
Set Printer = ptr
End If
Next
Printer.Print "filename"
Hi,
Can you show you how to redirect the output to a spool file as I specified?
Brgds,/Al
If I understand you correctly...
Take a look at the printer.enddoc method.
use that to handle the number of files you
put in the spool. Other than that, all you have to do
is select the printer driver.
No, I don't mean that.
I want to print to a file iso a printer device. Would u show where I can set the spool file name? (b'coz I can get help by looking up printers object on-line help.)
Thx,/Al
* Comments : Convert TIF to PDF
' *
' * This code is unsupported (and undocumented!) by Adobe, but works
' * a treat. It will convert a TIF (or any file that acrobat supports)
' * and convert it to PDF. You must have the full Adobe Acrobat
' * product installed (I was using Acrobat 4).
' *
' **********************************************************************
Private Sub Tif2PDF(filename As String)
Dim AcroApp As Object
Dim AVDoc As Object
Dim PDDoc As Object
Dim IsSuccess As Boolean
Set AcroApp = CreateObject("AcroExch.App")
Set AVDoc = CreateObject("AcroExch.AVDoc")
Call AVDoc.Open(filename, "")
Set AVDoc = AcroApp.GetActiveDoc
If AVDoc.IsValid Then
Set PDDoc = AVDoc.GetPDDoc
' Fill in pdf properties.
PDDoc.SetInfo "Title", txtDocTitle.Text
PDDoc.SetInfo "Author", txtDocAuthor.Text
PDDoc.SetInfo "Subject", cboDocType.Text
PDDoc.SetInfo "Keywords", txtDocKeyword.Text
If PDDoc.Save(1 Or 4 Or 32, App.Path & "\pdf\docfile.pdf") <> True Then
MsgBox "Failed to save " & filename
End If
PDDoc.Close
End If
'Close the PDF
AVDoc.Close True
AcroApp.Exit
'Cleanup
Set PDDoc = Nothing
Set AVDoc = Nothing
Set AcroApp = Nothing
End Sub