Hi,
I have a sub that inserts a hyperlink to the heading matching the selected text in MS Word 2013.
The header's range is found using:
HTML Code:
Selection.Find.Execute
Before doing that, I save the current range (i.e. that of the selected text) in order to restore it after the search has found the heading's range.
Although the range is restored correctly (and I'm back at the selected text), usually the view of the page is shifted, as if it was scrolled up or down a bit.
Since these shifts are sometimes large, I find them annoying enough to want to avoid this.
Is that possible?
I tried this by saving/restoring various built-in MS Word bookmark ranges, for example:
HTML Code:
ActiveDocument.Bookmarks("\page").Range
But this still causes shifts....
The thing is that the find.execute moves the focus to the heading found. Is there a way to disable this focus change?
Thanks!