Results 1 to 6 of 6
  1. #1
    bginhb is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    May 2011
    Location
    Huntington Beach, CA, USA
    Posts
    47

    Open a pdf file from Access

    I have an application that requires User help. I want to use PDF files for this purpose as the help information contains both text and graphics so I don't want to get into the Microsoft help thing which is too complex for this application.



    Is there a best way to launch the User's default PDF viewer by pointing at the file and doing the equivalent of double-clicking?

    Any and all assistance would be appreciated.

    Thnx

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Check out FollowHyperlink in VBA help.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    bginhb is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    May 2011
    Location
    Huntington Beach, CA, USA
    Posts
    47

    Results are inconsistant?

    Thanks for the suggestion. I went ahead and did as you suggested and got some results but ... the PDF opened in Internet Explorer even though Firefox is my default browser. Then the next time I ran it the PDF opened in my default PDF reader.

    Here's the code ... embedded on a button click event.

    Dim ctl As CommandButton
    Dim strSearchPath As String

    strSearchPath = CurDir & "\Help Screen -- Functions, Categories & Activities Selection 07-25-11.pdf"
    Set ctl = Me!Command23

    With ctl
    ' .Visible = False
    .HyperlinkAddress = strSearchPath
    .Hyperlink.Follow
    End With

    The inconsistancies make no sense to me!

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Well, that's not the method I mentioned. Try

    Application.FollowHyperlink strSearchPath

    which should use whatever program is associated with PDF files to open it. On my PC, that's Adobe reader.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    bginhb is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    May 2011
    Location
    Huntington Beach, CA, USA
    Posts
    47

    Okay

    Thanks for your assistance.

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    No problem; hopefully that worked for you.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 4
    Last Post: 09-28-2010, 07:04 PM
  2. Replies: 1
    Last Post: 09-27-2010, 10:10 AM
  3. open access 2007 only when called by executable file
    By rommelgenlight in forum Access
    Replies: 1
    Last Post: 01-20-2010, 12:50 PM
  4. Replies: 1
    Last Post: 08-19-2009, 01:54 AM
  5. Why 2 users cant open an access file directly???
    By finnegan bell in forum Access
    Replies: 6
    Last Post: 03-22-2009, 09:06 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums