[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Very Easy

Posted on 2003-10-30
6
Medium Priority
?
173 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
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 200 total points
ID: 9654893
to put in macro

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

Thanks,
~ fantasy ~
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

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…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
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…
Suggested Courses
Course of the Month19 days, 1 hour left to enroll

834 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