R
Rich M
I have user managed template driven by VBA macos. A recent problem occurred
in Word 2007 under Vista and I have not been able to reproduce with Word 2007
under XP. A macro issues a Selection.End Unit:=wdStory command and then
immediately follows with a Selection.MoveUp unit:=wdLine, count:=3 command.
If the users document view is set below 100% and they have a screen
resolution that allows multiple pages to be displayed when these commands
execute and there is an odd number of pages in the document being displayed
and the last line of the document happens to be the 1st line of the last page
.... then the MoveUp command actually places the cursor in the document 2
pages back. In other words, on a 5 page document with the last line being
the 1st line on page 5, then the cursor moves UP to page 3, and not page 4,
when the MoveUp command executes.
It appears that in this given situation the Selection.MoveUp command is
addressing screen coordinates and not document position.
Is this by design or error?
in Word 2007 under Vista and I have not been able to reproduce with Word 2007
under XP. A macro issues a Selection.End Unit:=wdStory command and then
immediately follows with a Selection.MoveUp unit:=wdLine, count:=3 command.
If the users document view is set below 100% and they have a screen
resolution that allows multiple pages to be displayed when these commands
execute and there is an odd number of pages in the document being displayed
and the last line of the document happens to be the 1st line of the last page
.... then the MoveUp command actually places the cursor in the document 2
pages back. In other words, on a 5 page document with the last line being
the 1st line on page 5, then the cursor moves UP to page 3, and not page 4,
when the MoveUp command executes.
It appears that in this given situation the Selection.MoveUp command is
addressing screen coordinates and not document position.
Is this by design or error?