Solved

Very Easy

Posted on 2003-10-30
6
164 Views
Last Modified: 2010-05-03
In word how would I get to the end of the document, like if this was the document how could I set the cursur to the last line.
and if the last line wasn't blank it would go to the next line like I would hit enter if you dont know what I mean let me know.
0
Comment
Question by:viperman95833
6 Comments
 
LVL 18

Expert Comment

by:Sethi
Comment Utility
By pressing Ctrl and End keys on the keyboard ;-)
0
 

Author Comment

by:viperman95833
Comment Utility
Funny I mean in VB
0
 

Expert Comment

by:vbwizardxxx
Comment Utility
In word you press Ctrl and End on the keyboard to get to the last line. You can do this programatically in vb by using sendkeys to send Ctrl (^) and End({END}).

SendKeys "^{END}"

Reply if you have any problems :)
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 5

Expert Comment

by:fantasy1001
Comment Utility
Try this

    Dim WordApp As New Word.Application
    Dim WordDoc As Word.Document
    Set WordDoc = WordApp.Documents.Open("c:\my.doc")
    WordApp.Selection.EndKey unit:=wdStory

Regard,
~ fantasy ~
0
 

Author Comment

by:viperman95833
Comment Utility
I was going to put this into my code for my macro so that at the end of the document the macro would write the options you chose
0
 
LVL 5

Accepted Solution

by:
fantasy1001 earned 50 total points
Comment Utility
to put in macro

Selection.EndKey unit:=wdStory
'write here whatever you want

Thanks,
~ fantasy ~
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now