Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / March 2005

Tip: Looking for answers? Try searching our database.

GoTo End of text

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tom - 06 Mar 2005 01:42 GMT
Using Word 2003, is it possible, using vba, that when an existing document
is opened the cursor is placed at the end of the text in that document.

If possible, an example of code would be appreciated

Tom
Greg Maxey - 06 Mar 2005 01:53 GMT
Tom

Something like:

Sub GoToEnd()
With ActiveDocument
 .Range(Start:=.Range.End - 1, End:=.Range.End - 1).Select
End With
End Sub

Change the name to Sub AutoOpen()

Signature

Greg Maxey/Word MVP
A Peer in Peer to Peer Support

> Using Word 2003, is it possible, using vba, that when an existing
> document is opened the cursor is placed at the end of the text in
> that document.
> If possible, an example of code would be appreciated
>
> Tom
Helmut Weber - 06 Mar 2005 02:10 GMT
Hi everybody,
in autoopen
ActiveDocument.Bookmarks("\endofdoc").Select

Greetings from Bavaria, Germany

Helmut Weber, MVP
"red.sys" & chr(64) & "t-online.de"
Word XP, Win 98
http://word.mvps.org/
Tom - 06 Mar 2005 11:37 GMT
Thanks Helmet and Greg

The code was put in autoopen. What is being noticed is that if we open Doc1
from word the code works OK, however if we are using Doc1 as the document &
with Access use OLE automation for a mail merge the cursor goes to the
begining of the document..

Is there a way of incorporation the required code into the OLE automation
code

Tom

> Hi everybody,
> in autoopen
[quoted text clipped - 6 lines]
> Word XP, Win 98
> http://word.mvps.org/
Tom - 07 Mar 2005 02:15 GMT
Don't worry about this - got it working

> Thanks Helmet and Greg
>
[quoted text clipped - 18 lines]
>> Word XP, Win 98
>> http://word.mvps.org/
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.