|
-
Apr 16th, 2000, 06:11 PM
#1
Thread Starter
New Member
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
-
Apr 16th, 2000, 10:01 PM
#2
Frenzied Member
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?
Harry.
"From one thing, know ten thousand things."
-
Apr 17th, 2000, 03:07 AM
#3
Code:
For Each ptr In Printers
If ptr.DeviceName = "AcrobatPDFWriter" Then
Set Printer = ptr
End If
Next
Printer.Print "filename"
-
Apr 17th, 2000, 11:05 AM
#4
Thread Starter
New Member
Hi,
Can you show you how to redirect the output to a spool file as I specified?
Brgds,/Al
-
Apr 17th, 2000, 09:57 PM
#5
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.
-
Apr 18th, 2000, 08:20 AM
#6
Thread Starter
New Member
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
-
May 1st, 2001, 02:25 PM
#7
Junior Member
* 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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|