Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Very Easy

Posted on 2003-10-30
6
167 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
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
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…
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 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…

791 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