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
1,018 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 34

Accepted Solution

by:
Dan Craciun earned 500 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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

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…
Preface: When I started this series, I used the term CommandBars because that is the Office Object class that it discusses. Unfortunately, when Microsoft introduced Office 2007, they replaced the standard Commandbar menus with "The Ribbon" and rem…
This video walks the viewer through the process of creating a watermark for their document, customizing it, and saving it for viewing/printing needs.
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 …

705 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

18 Experts available now in Live!

Get 1:1 Help Now