Moving the Curser

L

LEU

When my macro runs the curser ends up at the bottom of the document. I have
look in the help but can’t find how to make the curser return to the top of
the document. Can someone help?
 
J

Jean-Guy Marcil

LEU was telling us:
LEU nous racontait que :
When my macro runs the curser ends up at the bottom of the document.
I have look in the help but can't find how to make the curser return
to the top of the document. Can someone help?

If you use a Range object instead of a Selection object, the cursor would
not move, at all.

Now, in your case, try this:

Selection.HomeKey wdStory

By the way, you could have recorded a macro with he cursor at the end of the
document and doing CTRL-Home. Then you would have seen the above.
Of course, if you did not know about CTRL-Home...Then you couldn't have
recorded a macro!

--

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top