Word VBA 中的分节符
如何检测您的选择是否包含分节符?
现在我选择一个页面,折叠到最后,我想知道页面末尾是否包含分节符。
我打算使用一种方法,比较页面末尾的节号,然后向前移动两个字符,然后检查节号。如果它们不同,那么我的页面末尾确实有一个分节符 - 有更好的方法吗?
How can you detect if the selection you have contains or is the section break character?
At the moment I select a page , collapse to the end , I want to know if the end of the page contains a section break or not.
I was going to use a method where I compare the section number at the end of the page , then move two characters forward , then check the section number. If they are different then the end of my page does have a section break - is there a better way to do it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
也许是这样的:
Perhaps something on these lines:
干杯这是一个很好的建议。
我最终的做法是获取页面和部分的范围,检查两个“结束”位置,如果它们相同,则页面包含分节符。
Cheers that's a good suggestion.
The way I did it in the end was get the range of the page and section , check both "End" positions , if they were the same then the page contained the section break.