Results 1 to 9 of 9
  1. #1
    Star Lounger
    Join Date
    Jun 2004
    Location
    Lambertville, New Jersey, USA
    Posts
    82
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Open Word Doc from Access (2002)

    I need to open a word doc from within Access. I have a text box on a form with a hyperlink stored in it.

    Is there some "simple" way to open the doc file the link is pointing to? I thought all I would have to do is click on it or right click and follow the hyperlink menu but neither of these approaches worked.

    Any suggestions?


    Thanks
    Lance

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Open Word Doc from Access (2002)

    If the text box is bound to a hyperlink field, clicking it would be sufficient to open the Word document. If, however, the text box merely contains the path to a Word document, there is no built-in mechanism that tells Access to open the document. You can use an event procedure for this, for example to open the document when the user double clicks the text box:

    Private Sub txtDocument_DblClick(Cancel As Integer)
    Application.FollowHyperlink Me.txtDocument
    End Sub

    (using the On Click event is less attractive, because the user wouldn't be able to edit the text box.)

  3. #3
    Star Lounger
    Join Date
    Jun 2004
    Location
    Lambertville, New Jersey, USA
    Posts
    82
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Open Word Doc from Access (2002)

    Thanks.
    I used the DblClick event to trigger the Application.Follow... method and it worked fine.
    Re: the first suggestion: I'm using a Hyperlink data type for the field in the test box. No matter what I do, single click, double click, right click->Hyperlink->Open Hyperlink, it doesn't work.
    Thanks again,
    Lance

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Open Word Doc from Access (2002)

    Hyperlink fields and text boxes bound to hyperlink fields work OK on my system (Access 2002 SP-3).
    Do you have this problem in one specific database, or in all databases? To test, you could create a blank new database, then create a table in it with just one field of type Hyperlink.

  5. #5
    Star Lounger
    Join Date
    Jun 2004
    Location
    Lambertville, New Jersey, USA
    Posts
    82
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Open Word Doc from Access (2002)

    I did as you suggested and had the same issue. Clicking on the link did nothing. I'm running 2002 SP3 as well. I tried it on a second XP box I have in my office also running 2002 SP3. It worked correctly on this one. Guess I'll be reloading Access on my primary machine.
    Thanks for your help,
    Lance

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Open Word Doc from Access (2002)

    Try Help | Detect and Repair first.

  7. #7
    Star Lounger
    Join Date
    Jun 2004
    Location
    Lambertville, New Jersey, USA
    Posts
    82
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Open Word Doc from Access (2002)

    Didn't work. Still have the same problem.
    I use some Access developer tools that I loaded a long time ago. When loading one of them, I got an installation error which I believe caused this problem. I also have difficulty importing excel and CSV data. I get an error, the process aborts and kicks me out of Access. I import it on another machine and it works fine. Maybe this is just another capability that got trashed when I loaded the tools. I've reloaded Access before, but the problem remains. Perhaps something in the registery is not getting reset with the reload.

    Thanks,
    Lance

  8. #8
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Open Word Doc from Access (2002)

    If a repair installation doesn't work either, uninstalling all Access tools, then completely uninstalling and reinstalling Office XP may be your best bet.

  9. #9
    Star Lounger
    Join Date
    Jun 2004
    Location
    Lambertville, New Jersey, USA
    Posts
    82
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Open Word Doc from Access (2002)

    I agree.
    Thanks again for your help.
    Lance

Posting Permissions

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