Word Document, going to page from clicking web link.

I'm needing to open a word document and go automatically to Page 14, from clicking on a link within a webpage.

Does anyone know of some VB Script I can use to do this from within the webpage? Or other ways of doing it?
Who is Participating?
junglerover77Connect With a Mentor Commented:
Copy the following code and save it as an html file, and then test it.

<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<SCRIPT ID=clientEventHandlersJS LANGUAGE=javascript>

function button1_onclick() {
      var oWord=new ActiveXObject("Word.Application");
      oWord.Selection.GoTo(1, 2, 1, 3);


<P><INPUT type=button value=Button id=button1 name=button1 LANGUAGE=javascript onclick="return button1_onclick()"></P>

GrahamSkanConnect With a Mentor RetiredCommented:
This is tested in VB6, but I think it'll work in Script

    Dim wdApp 'As Word.Application
    Dim wdDoc 'As Word.Document
    Set wdApp = CreateObject("Word.Application")
    wdApp.Visible = True
    Set wdDoc = wdApp.Documents.Open("C:\MyFolder\MyDoc.doc")
    'wdApp.Selection.GoTo wdGoToPage, wdGoToAbsolute, 14
    wdApp.Selection.GoTo 1, 1, 14
PeterErhardAuthor Commented:
Thanks guys.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.