Very Easy

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.
viperman95833Asked:
Who is Participating?
 
fantasy1001Commented:
to put in macro

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

Thanks,
~ fantasy ~
0
 
SethiCommented:
By pressing Ctrl and End keys on the keyboard ;-)
0
 
viperman95833Author Commented:
Funny I mean in VB
0
Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

 
vbwizardxxxCommented:
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
 
fantasy1001Commented:
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
 
viperman95833Author Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.