Please Note: This article is written for users of the following Microsoft Word versions: 2007, 2010, 2013, 2016, 2019, and Word in Microsoft 365. If you are using an earlier version (Word 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Word, click here: Moving the Insertion Point to the End of a Line.

Moving the Insertion Point to the End of a Line

Written by Allen Wyatt (last updated February 1, 2020)
This tip applies to Word 2007, 2010, 2013, 2016, 2019, and Word in Microsoft 365


1

If you need to move the insertion point to the end of a line under the control of a VBA macro, it is done with the EndKey method. Syntax examples are as follows:

Selection.EndKey Unit:=wdLine, Extend:=wdMove
Selection.EndKey Unit:=wdLine, Extend:=wdExtend

The first line simply moves the insertion point, the second moves it and selects all the text between the current insertion point and the end of the line.

Note:

If you would like to know how to use the macros described on this page (or on any other page on the WordTips sites), I've prepared a special page that includes helpful information. Click here to open that special page in a new browser tab.

WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (12817) applies to Microsoft Word 2007, 2010, 2013, 2016, 2019, and Word in Microsoft 365. You can find a version of this tip for the older menu interface of Word here: Moving the Insertion Point to the End of a Line.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Entering Calculations in a Form Field

One of the many uses for Word is to create forms that can be easily filled in by other people. This is made possible by ...

Discover More

Jumping to Text in Worksheet from an Index

In putting together a workbook, you may develop a worksheet that acts as an index, to contain links that lead to other ...

Discover More

Indexing Based on a Range of Letters

Word provides many options for creating indexes. One option allows you to specify that the index contain only entries ...

Discover More

Learning Made Easy! Quickly teach yourself how to format, publish, and share your content using Word 2013. With Step by Step, you set the pace, building and practicing the skills you need, just when you need them! Check out Microsoft Word 2013 Step by Step today!

More WordTips (ribbon)

Changing Built-in Word Commands

Want to replace Word's internal commands with your own macros? It's easy to do if you know the key discussed in this tip.

Discover More

Accessing the Dirty Flag

When creating macros, you might want to know if a user has made changes in the document or not. Here's how to figure that ...

Discover More

Protecting Macros in a Corporate Environment

When you use a computer at work, that computer may be subject to periodic updating or replacement. If you want to protect ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is two more than 7?

2020-02-04 15:57:36

Jay

Sometime, please explain how to do the following as well:
1. Move the insertion point to the beginning of the paragraph.
2. Move the insertion point to the end of the paragraph.
3. Select entire paragraph your insertion point resides in (including paragraph code).
Thank you, Allen.


This Site

Got a version of Word that uses the ribbon interface (Word 2007 or later)? This site is for you! If you use an earlier version of Word, visit our WordTips site focusing on the menu interface.

Videos
Subscribe

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.