Hyperlink to a Word Document

Posted on 2006-07-11
Last Modified: 2012-06-27
I am working in Access 97:

I have a help manual in Word for my database.  I would like to add a button to a form and when it is clicked, have it go to a specific page of the Word document.   Can I use the hyperlink feature?

Thanks for your help.

Question by:Sasha42
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
LVL 65

Expert Comment

ID: 17082365
unless u have some sort of macro in your word doc, try this
Bit of word automation Im afraid

Public Sub OpenWordDoc()

    Dim objWord As Object
    Set objWord = CreateObject("Word.Application")

'Open doc c:\mydoc.doc
    objWord.Documents.Open "C:\mydoc.doc"

'goto page 2
    objWord.Selection.GoTo What:=wdGoToPage, Which:=wdGoToFirst, Count:=2, name:=""
    objWord.Visible = True
End Sub

LVL 65

Expert Comment

ID: 17082626
I just tried that code and it went straight to page 2


Author Comment

ID: 17082855
Thanks for your help.

I get a variable not defined error at: =wdGoToPage
LVL 39

Accepted Solution

stevbe earned 250 total points
ID: 17083784
building upon the shoulders of a giant ...

if you want a specific named bookmark then ...

to stop the undefined variable you can either set a refernece to Word or define wdGoToBookmark = -1

Private Sub cmdHelpAddNewClient_Click()

Dim objWord As Object
Dim wdGoToBookmark As Long
    Set objWord = CreateObject("Word.Application")
    wdGoToBookmark = -1

    'Open doc c:\mydoc.doc
    objWord.Documents.Open "C:\mydoc.doc"

    'goto a named bookmark
    objWord.Selection.GoTo What:=wdGoToBookmark, Name:="Add Client"
    objWord.Visible = True

End Sub

LVL 65

Expert Comment

ID: 17085537
Sasha42, sorry for the late response. I was at work for a while but I left before u posted
And had guests today!

But I see u are using a bookmark method now

for your info

wdGoToPage is equvalent to 1
wdGoToFirst is also equivalent to 1

change them to 1 and see if it works for you
I would be interested to know

Featured Post

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question