Page Down in Synch

November 19, 2003 – 12:00 pm

Working on an index this week, I needed to ensure that pagination of the document I was indexing matched another document in which pagination had already been set. Because of the complexity of the material, I had to do this manually and visually, paging down in document 1, switching to document 2, paging down again, and then switching back to document 1. What a pain! It wasn’t long before I found myself writing a macro to move down a page in both documents at once. Here it is, short but sweet:

‘MACRO STARTS HERE

Sub PageDownInSynch()

Documents(2).Activate

Selection.GoTo What:=wdGoToPage

Documents(1).Activate

Selection.GoTo What:=wdGoToPage

End Sub

‘MACRO ENDS HERE

If you don’t know how to use macros like that one, you can learn how here:

For the macro to work, you must have two documents open in Word at the same time, and the process works best if you’ve sized and arranged the two documents vertically side by side. (Our Editor’s ToolKit program includes an “Arrange Documents” macro that will do that for you instantly and automatically.)

For best results, assign the macro to a keyboard combination so you can quickly run it over and over with the touch of a key. You can learn how to do that here:

http://www.topica.com/lists/editorium/read/message.html?mid=1713088939

Now you can page through your documents, adjusting pagination as needed with manual page breaks (CTRL + ENTER). You’ll probably find other uses for the macro as well. Enjoy!

_________________________________________

READERS WRITE

William T. Buckley wrote, “This is not a huge issue, but it does come up once in a while, especially in limited-space conditions. How do I produce a circled-c ‘circa’ sign or symbol, not to be confused with a (c) copyright symbol? I’ve looked at several grids and character maps, and don’t find anything like what I need.”

I was unable to find such a character, even in Unicode fonts. Do you, gentle reader, have an answer?

Preston Earle wrote, “Thanks for the improved Title Case macro. Is there a way to modify the macro such that it ignores a list of all-caps words like USA, NASA, MS (as in MS Word), and, perhaps, state abbreviations?”

I’ve now modified the macro to do this. Here’s the new version:

‘MACRO BEGINS HERE

Sub TitleCaseHeadings()

‘Created by Jack M. Lyon

For h = 1 To 9

Selection.HomeKey Unit:=wdStory

Selection.Find.ClearFormatting

myHeading$ = “Heading” + Str(h)

Selection.Find.Style = ActiveDocument.Styles(myHeading$)

With Selection.Find

.Text = “”

.Replacement.Text = “”

.Forward = True

.Wrap = wdStop

.Format = True

.MatchCase = False

.MatchWholeWord = False

.MatchWildcards = False

.MatchSoundsLike = False

.MatchAllWordForms = False

End With

Selection.Find.Execute

While Selection.Find.Found = True

Selection.Range.Case = wdTitleWord

For Each wrd In Selection.Range.Words

Select Case Trim(wrd)

Case “A”, “An”, “As”, “At”, “And”, “But”, _

“By”, “For”, “From”, “In”, “Into”, “Of”, _

“On”, “Or”, “Over”, “The”, “Through”, _

“To”, “Under”, “Unto”, “With”

wrd.Case = wdLowerCase

Case “Usa”, “Nasa”, “Usda”, “Ibm”, “Nato”

wrd.Case = wdUpperCase End Select

Next wrd

wrdCount = Selection.Range.Words.Count

Selection.Range.Words(1).Case = wdTitleWord

Selection.Range.Words(wrdCount - 1).Case = wdTitleWord

strLength = Selection.Range.Characters.Count

For i = 1 To strLength

If Selection.Range.Characters(i) = “:” Then

Selection.Range.Characters(i + 2).Case = wdTitleWord

End If

Next i

Selection.Find.Execute

Wend

Next h

MsgBox “Finished!”, , “Title Case Headings”

End Sub

‘MACRO ENDS HERE

The line that makes the difference is this one:

Case “Usa”, “Nasa”, “Usda”, “Ibm”, “Nato”

Feel free to modify that line to suit your needs. The items I’ve included are just examples. Notice, though, that for the macro to work, you must type your items not in all caps (USA) but in title case (Usa). That’s because the macro has already put the whole *line* in title case, so you’re now specifying words in title case that you want to be in all caps.

Many thanks for the help, questions, and suggestions.

_________________________________________

RESOURCES

SoftSnow offers some very interesting software that may come in handy if you’re involved in electronic publishing or converting documents to HTML. Book Proofer and HTML Book Fixer look especially interesting:

http://www.softsnow.biz/index.shtml

_____________________________________________________

THE FINE PRINT

Editorium Update (ISSN 1534-1283) is published by:

The EDITORIUM, LLC

Microsoft Word Add-Ins for Publishing Professionals

http://www.editorium.com

Copyright © 2008 by the Editorium. All rights reserved. Editorium Update and Editorium are trademarks of the Editorium.

You may forward copies of Editorium Update to yourself and others (but not charge for it) and print or store it for your own use. Any other broadcast, publication, retransmission, copying, or storage, without written permission from the Editorium, is prohibited. Send reprint requests to reprints [at symbol] editorium.com

Editorium Update is provided for informational purposes only and without a warranty of any kind, either express or implied, including but not limited to implied warranties of merchantability, fitness for a particular purpose, and freedom from infringement. The user assumes the entire risk as to the accuracy and use of this document.

The Editorium is not affiliated with Microsoft Corporation.

_____________________________________________________

HOW TO SUBSCRIBE OR UNSUBSCRIBE

To subscribe, send a blank email message to editorium-subscribe [at symbol] topica.com.

To unsubscribe, send a blank email message to editorium-unsubscribe [at symbol] topica.com.

We do not sell, rent, or give our subscriber list to anyone.

____________________________________________________

You must be logged in to post a comment.