Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Word 2010 - VBA  code to bring cursor to the left side  of screen (start of line) and more

Posted on 2014-01-26
1
Medium Priority
?
1,064 Views
Last Modified: 2014-02-04
Hi:
I need help coding the following:
I have my cursor in the middle of a line of text.
I need code to bring cursor to the left side  of the document screen (start of line) in a document and move down one line.
Wait 5 seconds.
move cursor down one line.
Wait 5 seconds.
End of macro.
0
Comment
Question by:brothertruffle880
1 Comment
 
LVL 35

Accepted Solution

by:
Dan Craciun earned 2000 total points
ID: 39810019
Try this:
Sub test()
   Selection.MoveStart unit:=wdLine
   Selection.MoveDown unit:=wdLine, Count:=1
   sleep (5000)
   Selection.MoveDown unit:=wdLine, Count:=1
   sleep (5000)
End Sub

Open in new window

HTH,
Dan
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

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

A few years ago I was very much a beginner at VBA, and that very much remains the case today.  I'll do my best to explain things as I go in the hope that other beginners can follow.  If you just want to check out a tool that creates a Select Case fu…
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …
This Micro Tutorial well show you how to find and replace special characters in Microsoft Word. This is similar to carriage returns to convert columns of values from Microsoft Excel into comma separated lists.

885 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