FollowHyperlink not working with pdf file

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Bhujanga
    New Member
    • Aug 2006
    • 44

    FollowHyperlink not working with pdf file

    There is a screen for printing various form in an application I have. Some of them integrate data into the forms, but a few are just there so the users can grab standard forms while they're in the screen. So I have been using command buttons that say what form it will open. The code that goes with the command button is as follows:

    Dim Path As String
    Path = DLookup("[Path]", "Region Data") & "\Common"
    strInput = Path & "\ECIS.pdf"
    Application.Fol lowHyperlink strInput, , False

    I just had to change this particular form. The old form was a Word document and the new form is a pdf document. So all I changed was the extension in the code form ".doc" to ".pdf". It worked fine before, now it just opens Acrobat Reader, but doesn't bring the document in. And that, my friends, is my problem.

    P.S. Don't worry about the path definition - I'm sure this is correct.

    Thanks you.
  • nico5038
    Recognized Expert Specialist
    • Nov 2006
    • 3080

    #2
    Strange problem, looks like the problem is Acrobat-Reader and not Access related.
    Are you sure the correct version of the reader is installed ?

    An alternative might be to start the application using the SHELL() function.

    Nic;o)

    Comment

    • ADezii
      Recognized Expert Expert
      • Apr 2006
      • 8834

      #3
      Originally posted by Bhujanga
      There is a screen for printing various form in an application I have. Some of them integrate data into the forms, but a few are just there so the users can grab standard forms while they're in the screen. So I have been using command buttons that say what form it will open. The code that goes with the command button is as follows:

      Dim Path As String
      Path = DLookup("[Path]", "Region Data") & "\Common"
      strInput = Path & "\ECIS.pdf"
      Application.Fol lowHyperlink strInput, , False

      I just had to change this particular form. The old form was a Word document and the new form is a pdf document. So all I changed was the extension in the code form ".doc" to ".pdf". It worked fine before, now it just opens Acrobat Reader, but doesn't bring the document in. And that, my friends, is my problem.

      P.S. Don't worry about the path definition - I'm sure this is correct.

      Thanks you.
      'Path' is a Property that is used to determine the location of information stored through the CurrentProject or CodeProject Objects of an Access Project or Database. It should never be used within a Variable Declaration, try changing it.

      Comment

      • ADezii
        Recognized Expert Expert
        • Apr 2006
        • 8834

        #4
        Originally posted by Bhujanga
        There is a screen for printing various form in an application I have. Some of them integrate data into the forms, but a few are just there so the users can grab standard forms while they're in the screen. So I have been using command buttons that say what form it will open. The code that goes with the command button is as follows:

        Dim Path As String
        Path = DLookup("[Path]", "Region Data") & "\Common"
        strInput = Path & "\ECIS.pdf"
        Application.Fol lowHyperlink strInput, , False

        I just had to change this particular form. The old form was a Word document and the new form is a pdf document. So all I changed was the extension in the code form ".doc" to ".pdf". It worked fine before, now it just opens Acrobat Reader, but doesn't bring the document in. And that, my friends, is my problem.

        P.S. Don't worry about the path definition - I'm sure this is correct.

        Thanks you.
        'Path' is a Property that is used to determine the location of information stored through the CurrentProject or CodeProject Objects of an Access Project or Database. It should never be used within a Variable Declaration, try changing it. It is also the name of a Field in the Region Data Table leaving a lot of room for ambiguity.

        Comment

        • Bhujanga
          New Member
          • Aug 2006
          • 44

          #5
          Originally posted by ADezii
          'Path' is a Property that is used to determine the location of information stored through the CurrentProject or CodeProject Objects of an Access Project or Database. It should never be used within a Variable Declaration, try changing it. It is also the name of a Field in the Region Data Table leaving a lot of room for ambiguity.
          I changed the variable name to PathA and it did the trick. Thanks. Sorry it took me so long to reply. I've been out of the office for a while.

          Comment

          • ADezii
            Recognized Expert Expert
            • Apr 2006
            • 8834

            #6
            Originally posted by Bhujanga
            I changed the variable name to PathA and it did the trick. Thanks. Sorry it took me so long to reply. I've been out of the office for a while.
            Not a problem, glad you were able to arrive at the solution.

            Comment

            Working...