vbaword-2003

jump to another page in word with visual basic


I am working with visual basic now for the first time in word 2003. I want to know if there is a way to jump to another pagenumber.

I have a checkbox and if that checkbox is true it has to redirect me to let say pagenumber 5. I know how to find out if a checkbox is true, but i can't figure out the jump to pagenumber 5 part.

Can somebody please help me with this one?

Thanks for your effort!


Solution

  • Use this snippet of code:

    Selection.GoTo wdGoToPage, wdGoToAbsolute, 5 'your page number here