Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2002
    Location
    Norway
    Posts
    239

    Question Unanswered: Create PDF file of a Word document using VB.

    I need to create a PDF file of a Word document using VB.
    The existing links in the word document MUST be kept in the new PDF document.
    If the macro "ConvertToPDF" or "DoPrintWithLinks" is included in the answer I need to know how to overcome the problem with answering yes or no while saving or overwriting files.
    Actually, I would be happy if I know what was hided behind one of the above macros!

    Thanks a lot
    Vestígő

  2. #2
    Join Date
    Nov 2003
    Posts
    1

    Re: Create PDF file of a Word document using VB.

    Originally posted by vestigo
    I need to create a PDF file of a Word document using VB.
    The existing links in the word document MUST be kept in the new PDF document.
    If the macro "ConvertToPDF" or "DoPrintWithLinks" is included in the answer I need to know how to overcome the problem with answering yes or no while saving or overwriting files.
    Actually, I would be happy if I know what was hided behind one of the above macros!

    Thanks a lot
    Vestígő
    Did you resolve your problem?
    I used this code:

    Dim X As Printer
    For Each X In Printers
    ' Select Acroibat distiller for printer
    If UCase(X.DeviceName) = UCase("Acrobat Distiller") Then
    Set Printer = X
    Exit For
    End If
    Next X

    Dim w As Word.Document
    Set w = Documents.Open("example.doc")
    w.PrintOut
    Set w = Nothing
    Set x = Nothing
    The problem of this code is that I can't customize the final path and name of the PDF output.
    Have you got a suggestion?

    THX!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •