vba 使用visual basic跳转到word中的另一页
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/22244599/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
jump to another page in word with visual basic
提问by RvA
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.
我现在第一次在 word 2003 中使用visual basic。我想知道是否有办法跳转到另一个页码。
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.
我有一个复选框,如果该复选框为真,它必须重定向我,让我说 pagenumber 5。我知道如何确定复选框是否为真,但我无法弄清楚跳转到 pagenumber 5 部分。
Can somebody please help me with this one?
有人可以帮我解决这个问题吗?
Thanks for your effort!
谢谢你的努力!
采纳答案by CommonGuy
Use this snippet of code:
使用这段代码:
Selection.GoTo wdGoToPage, wdGoToAbsolute, 5 'your page number here