Results 1 to 3 of 3
  1. #1
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    More PDF fun (Word 97SR2)

    Here's a handy (updated) macro that prints a PDF from
    Word VBA (applicable, I'm sure to any flavor of VBA or VB for
    that matter). I added .pdf1.visible = false to keep the
    Acrobat Reader splash screen from displaying. That's
    three, count 'em 3, methods/properties of the PDF.ocx
    revealed. This is how undocumented objects get
    documented. If anyone knows the programmer who wrote
    the thing, ask him/her to post the documentation and save
    us all some time.

    The form referred to is blank except for an empty instance of the PDF.ocx control which you must reference for this to work.

    Sub PrintThisPDF(strFileName As String)
    If oFSO.FileExists(strFileName) Then
    Load frmPDF
    With frmPDF
    .Pdf1.Visible = False
    .Pdf1.src = strFileName
    .Pdf1.printAll
    End With
    Unload frmPDF
    Else
    Call LogNTEvent("While attempting to print a PDF, the file: " & strFileName & " could not be found.", "Warning")
    End If
    End Sub

    You may not need this now, but I bet you will someday soon...

    Pop quiz: what programming language do PDF files utilize for internal "macro" programming?
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: More PDF fun (Word 97SR2)

    > Pop quiz: what programming language do PDF files utilize for internal "macro" programming?

    JavaScript?

  3. #3
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: More PDF fun (Word 97SR2)

    Bingo!
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

Posting Permissions

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