Solved

Very Easy

Posted on 2003-10-30
6
165 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
ID: 9654678
By pressing Ctrl and End keys on the keyboard ;-)
0
 

Author Comment

by:viperman95833
ID: 9654774
Funny I mean in VB
0
 

Expert Comment

by:vbwizardxxx
ID: 9654818
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 5

Expert Comment

by:fantasy1001
ID: 9654822
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
ID: 9654887
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
ID: 9654893
to put in macro

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

Thanks,
~ fantasy ~
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

920 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

14 Experts available now in Live!

Get 1:1 Help Now