Satyagraha

Cultural Psychology

A Simple Way to Automatically Page Through a Word Document

leave a comment »

We pause from our usual social commentary to post an MS Word tip.

Lately I found a simple way in MS Word to automatically page through a document, pausing a fixed amount of time on each page.  This lets one read a document without having to repeatedly press the Page Down key or otherwise manually advancing text  — e.g., for hands-free reading.

Steps

From the MS Word menu (this is for Word 98, but the commands are basically the same in other versions):

Tools -> Macro -> Visual Basic Editor

Then cut and paste the code below:

     Sub PageScroll()
     For i = 1 To 100 'Number of times to to repeat
        Call KillSomeTime
        Selection.MoveDown Unit:=wdScreen, Count:=1
     Next i
     End Sub
     Sub KillSomeTime()
     ' This sub courtesy Austin Myers
     Dim PauseTime, Start
     PauseTime = 30  'Set duration in seconds
     Start = Timer  ' Set start time.

     Do While Timer < Start + PauseTime
        DoEvents ' Yield to other processes.
     Loop

     End Sub

(It helps to know something about VBA [Visual Basic for Applications], which is built into MS Word.  The code above is set to page down 100 times, pausing 30 seconds on each page.  You can reset these values to suit your needs.)

The code above defines a new macro called PageScroll which you can then invoke by the commands:

Tools -> Macro -> Macros -> PageScroll

Or you can assign the new macro to a shortcut key and invoke it that way, following the simple instructions MS Word supplies for that.

A tip:  close any other sessions of MS Word that you may have oven besides this one.  When you exit this session, it will try to update your Normal.dot file.  If another Word sessions is open, it will instead ask you to supply a different name for Normal.dot, which you don’t want.

Advertisements

Written by John Uebersax

August 10, 2012 at 11:25 pm

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: