Results 1 to 7 of 7

Thread: How to convert multi format docs to PDF?

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2000
    Posts
    5
    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

  2. #2
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    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."

  3. #3
    Guest
    Code:
        For Each ptr In Printers
            If ptr.DeviceName = "AcrobatPDFWriter" Then
                Set Printer = ptr
            End If
        Next 
        Printer.Print "filename"


  4. #4

    Thread Starter
    New Member
    Join Date
    Apr 2000
    Posts
    5

    Smile

    Hi,

    Can you show you how to redirect the output to a spool file as I specified?

    Brgds,/Al

  5. #5
    Guest
    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.

  6. #6

    Thread Starter
    New Member
    Join Date
    Apr 2000
    Posts
    5
    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

  7. #7
    Junior Member
    Join Date
    Apr 2001
    Posts
    22
    * 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
  •  



Click Here to Expand Forum to Full Width