Re: Move cursor to the last position
- From: "Stefan Blom" <no.spam@xxxxxxxxxx>
- Date: Mon, 3 Jul 2006 12:38:09 +0200
This would be a lot easier:
Selection.EndKey Unit:=wdStory
But note that a "correct" answer to your question depends on what you
are trying to do. If you moving the cursor in order to insert text at
the end of the document or modify paragraph properties of existing
text, you don't have to depend on cursor position/selections. For
example, you can access the properties of the final paragraph by
setting an object reference to it:
Dim mypara As Paragraph
Set mypara = ActiveDocument.Paragraphs.Last
With mypara
'code here
End With
--
Stefan Blom
Microsoft Word MVP
"Juan M Afan de Ribera" wrote in message
news:uy3MmronGHA.1504@xxxxxxxxxxxxxxxxxxxxxxx
Hi to everyone,By now, I
I need to move the cursor to the last position of a word document.
have found a way to do it and it seems to work
Dim r As Range
On Error Resume Next
Set r = ActiveDocument.Paragraphs(1).Range
r.Move wdParagraph, ActiveDocument.Range.Paragraphs.Count
r.Select
Set r = Nothing
On Error GoTo 0
but I am not sure that this is the correct one.
Any ideas?
TIA.
--
Access... también exiSte...!!
Saludos,
Juan M. Afán de Ribera
[MVP Access]
http://accessvbafaq.mvps.org
http://www.mvp-access.com/juanmafan
.
- References:
- Move cursor to the last position
- From: Juan M Afan de Ribera
- Move cursor to the last position
- Prev by Date: Move cursor to the last position
- Next by Date: Re: Move cursor to the last position
- Previous by thread: Move cursor to the last position
- Next by thread: Re: Move cursor to the last position
- Index(es):
Relevant Pages
|