Home All Groups Group Topic Archive Search About

Open word to a specific page

Author
19 Oct 2006 1:18 AM
bhoff
I have a program where a user can click on a LinkLabel to open a word
document to view a reference. I can't figure out how to make word jump
to a specified page though, example:

A reference to test.doc, page 13 is where the user needs to find a
reference from

Dim wd as new microsoft.office.interop.word.application = new
microsoft.office.interop.word.application
Dim wdDoc as microsoft.office.interop.word.document

wdDoc = wd.documents.open(FileName)

wdDoc.goto(13)

All this does is open the document, but doesn't scroll down to page
13...any Ideas?

Thanks

Author
19 Oct 2006 1:23 AM
Scott M.
Selection.GoTo(wdGoToPage,wdGoToNext,"13")

You gotta love the macro recorder.


Show quoteHide quote
"bhoff" <ben_hoff***@cox.net> wrote in message
news:1161220704.175573.244380@h48g2000cwc.googlegroups.com...
>I have a program where a user can click on a LinkLabel to open a word
> document to view a reference. I can't figure out how to make word jump
> to a specified page though, example:
>
> A reference to test.doc, page 13 is where the user needs to find a
> reference from
>
> Dim wd as new microsoft.office.interop.word.application = new
> microsoft.office.interop.word.application
> Dim wdDoc as microsoft.office.interop.word.document
>
> wdDoc = wd.documents.open(FileName)
>
> wdDoc.goto(13)
>
> All this does is open the document, but doesn't scroll down to page
> 13...any Ideas?
>
> Thanks
>
Author
29 Nov 2006 5:17 PM
hula
> You gotta love the macro recorder.


.... Thanks that helped :)