|
Editorium Update 2006/04/20: Converting Text Boxes to Text
|
The Editorium
|
Apr 20, 2006 11:22 PDT
|
Thanks for reading Editorium Update! The Editorium does not send
unsolicited email messages. You've received this newsletter because you
subscribed to it or a friend has forwarded it to you. To subscribe or
unsubscribe, see the instructions at the end of this message.
Editorium Update is published by the Editorium, which provides Microsoft
Word macros and other resources for publishing professionals. For more
information, visit us at http://www.editorium.com.
______________________________________________________
EDITORIUM UPDATE
Tips for Publishing Professionals Using Microsoft Word
April 20, 2006
______________________________________________________
CONTENTS
Feature Article: Converting Text Boxes to Text
Readers Write:
Tracked changes inconsistency
Help with final check on an electronic document
Resources: Web Style Guide
_____________________________________________________
Still working the hard way? Try Editor's ToolKit Plus, our premier
add-in for Microsoft Word. The program automatically cleans up common
editorial and typographical problems, converts automatically numbered
notes to text (or vice versa), converts files for QuarkXPress, and makes
editing a snap (well, snappier than usual). Why not try it today?
http://www.editorium.com/14857.htm
_____________________________________________________
CONVERTING TEXT BOXES TO TEXT
By Jack M. Lyon
I've recently needed to help several people convert Microsoft Word text
boxes to text. Is there something in the wind? Whatever is going on, if
you're having to copy and paste, copy and paste, to get that text out
where you can use it, you'll appreciate the following macro, which pulls
text-box text out as regular text and styles it with a character style
named "OnceABox," colored red for easy identification. To (eventually)
get rid of the red, just delete the character style. (Thanks to Geoff
Hart, David Chinell, and Janna DeVore for inspiration.)
If you don't know how to use such macros, you'll find instructions here:
http://lists.topica.com/lists/editorium/read/message.html?mid=1706922855
If you have lots of documents that need to be converted, you might
consider running the macro with my MultiMacro program:
http://www.editorium.com/14844.htm
And now, the macro. Enjoy!
'MACRO STARTS HERE
Sub ExtractTextBoxes()
Dim NoStyle As Boolean
Dim aStyle As Style
Dim aShape As Shape
Dim i As Integer
'Check for "OnceABox" character style
NoStyle = True
For Each aStyle In ActiveDocument.Styles
If aStyle.NameLocal = "OnceABox" Then
NoStyle = False
Exit For
End If
Next aStyle
'If necessary, create "OnceABox"
'character style
If NoStyle Then
ActiveDocument.Styles.Add Name:="OnceABox", _
Type:=wdStyleTypeCharacter
With ActiveDocument.Styles("OnceABox").Font
.Color = wdColorRed
End With
End If
'Style textboxes and convert to frames
For Each aShape In ActiveDocument.Shapes
If aShape.Type = msoTextBox Then
i = i + 1
aShape.Select
aShape.ConvertToFrame
Selection.Style = _
ActiveDocument.Styles("OnceABox")
End If
Next
'Clean and delete frames
For i = ActiveDocument.Frames.Count _
To 1 Step -1
With ActiveDocument.Frames(i)
.Borders.Enable = False
With .Shading
.Texture = wdTextureNone
.ForegroundPatternColor = _
wdColorAutomatic
.BackgroundPatternColor = _
wdColorAutomatic
End With
.Delete
End With
Next
End Sub
'MACRO ENDS HERE
___________________________________________
READERS WRITE
Following up on my February 9 article on Microsoft's seeming
inconsistency regarding tracked changes, Ed Nelson sent this interesting
comment:
We must accept the changes, but reject the inserts to get equivalent
results, the omission of the text under consideration.
Sometimes the problems we see come from outside circumstances
conflicting with the way our mind sees the issue in the first place.
Here's what I'm trying to get at:
We may see the issue as being "What is this command going to do to the
text before me?" And what the commands do *does* seem opposite to each
other. But if we see it as "What will this command do to the established
procedure?" the resuilt isn't so weird. To overcome the Insert process,
the new text gets omitted. To overcome the prior editorial correction,
the new text (a different item in this case) also gets omitted.
Contradictory procedures are both being overcome. Consistent, No?
------------------------
In the March 24 newsletter, Ed Millis asked for help with the final
checking of a document, including, as he wrote, "ensur[ing] all tables
and figures are numbered correctly and correspond to their text mention,
mak[ing] sure every paragraph has the proper indent and reference (every
(a) has a (b), and it's not (b) when it should be (2), and I didn't
overlook any abbreviations."
The generous and brilliant Eric Fletcher responded:
I run into similar types of issues as described by your reader Ed
Millis, but would never consider printing the document! IMHO, viewing it
on the screen is not only less wasteful of paper, but with a few tweaks,
you can focus specifically on the particular issue.
I would use Find & Replace's wild card feature to highlight all elements
contained within parentheses, then put the file in normal view (zoomed
up quite large so I could lean back and do my review with mouse only . .
. ), use the Find dialog to find the first instance of a highlight, then
use the downward pointing icon in the lower left of the vertical
scrollbar to skip through and review all of the others.
For abbreviations, you can pull everything in all caps to a second
document, then sort it and look for anomalies. Use Find with wildcards
to look for the pattern "[A-Z]{2,5}" (to get all instances of 2-5
capital letters) but choose "Find All" instead of the normal Find. This
will select all instances. Drop out of the dialog and Ctrl-C to copy.
Make a new document and Paste: you will have a complete set of all found
items. When sorted, abbreviations that don't look right are easy to
spot.
In fact, for this application, I typically set the abbreviations in
their own character style so I can pull them for generating an acronym
list. Some abbreviations don't follow the all caps rule ("SoS/E" is a
recent example in a book I'm working on for example), but if I have a
button to attach the style, it is easy to do as I encounter it. Then,
later, I can pull anything tagged with the "abbreviation" style to help
create the acronym list.
I have a little macro that helps me correct all other instances of a
selection and set them in a character style. I needed it to set Latin
names in a document where they needed to be ignored for spell check, but
were inconsistently spelled and presented in the supplied content. For
example, "tuberosa" was sometimes "tuberaso" but both needed to be
tagged as my "Latin" style. As I review words that had been set in
italics (Find, Ctrl-i), and came across a word I had not yet set, I can
select it and click my SetLatin button. The VBA code presents "tuberaso"
(selected) in a dialog and lets me type in "tuberosa". When I click
Okay, it uses the VBA Replace all to fix any other instances throughout
the document. What makes this particularly helpful is that I have the
"Latin" character style set in a temporary colour (say purple) so that
as I progress through the document, terms I've dealt with show up
distinctly because they are coloured. I then reset the colour to
automatic within the style definition before I complete the job. Here's
the code I use (it can be modified to fit other requirements):
[Editor's note: I've broken lines so they'll work when copied from this
email newsletter. Also, before using the macro, you must create a
character style named "Latin." You should take seriously Eric's
suggestion to modify the macro to fit other requirements; this macro
could be a very useful tool for many purposes.]
'MACRO STARTS HERE
Sub SetLatin()
' Proposes to replace the selected string
' with whatever you type in,
' and applies the Latin character style
' to each instance.
'
' Set up to deal with correcting
' all instances of italicized words
' in a scanned document (e.g., Latin names)
' because they can be both misinterpreted
' and need to be set in italics consistently.
Dim strReplacement As String
strReplacement = _
InputBox("Replace all instances of [" & _
Selection.Text & _
"] with whatever is entered below, " & _
"and also set each with the " & _
"Latin character style.", _
"Set all like this as Latin", _
Selection.Text)
If strReplacement <> "" Then
With ActiveDocument.Range.Find
.Text = Selection.Text
.MatchWholeWord = True
.Replacement.Text = strReplacement
.Replacement.Style = _
ActiveDocument.Styles("Latin")
.Execute Replace:=wdReplaceAll, _
Forward:=True, Wrap:=wdFindContinue
End With
End If
End Sub
'MACRO ENDS HERE
The advantage of using code like this is that it doesn't change what you
have set in the Find & Replace dialog. If I did it within the dialog,
I'd need to remember to turn off the style the next time I used the
dialog. I have several little chunks of code for such things, and it can
really improve the efficiency of reviewing.
Incidentally, my temporary colour method can also be very handy for
setting styles. If the main body styles area all defined to be based on,
say, Body Text, I can set its colour to green. Then, as I tag the
content by whatever method, the paragraphs with my styles attached will
show up in green so I can concentrate on the non-green content. This is
particularly useful if you use either Find & Replace to help tag, or use
the "Select all instances" option available from the Styles and
Formatting task pane. Either way enables you to assign styles "blindly,"
but with the colour, you can see what remains to be tagged manually as
you review.
This is probably only peripherally relevant to Ed's question, but
hopefully some of it will apply!
------------------------
Many thanks to Ed and Eric. If you have questions, hints, or comments
you'd like to share, please send an email message here:
mailto:hin-@editorium.com
_____________________________________________________
RESOURCES
Are you writing for the web, or editing text to be published on the web?
You'll find the Web Style Guide to be an invaluable aid:
http://www.webstyleguide.com/
If you'd like to tell us about a resource that others might find useful,
please email us here:
mailto:resou-@editorium.com
____________________________________________________
HELP WANTED
If you need help with Word, there are actually lots of places to go.
Some of the best include:
The Word-PC List:
http://listserv.liv.ac.uk/archives/word-pc.html
The McEdit list:
http://groups.yahoo.com/group/McEdit/
Microsoft's Word discussion groups:
http://www.microsoft.com/office/community/en-us/FlyoutOverview.mspx#13
(Look in the lower right of the page.)
The Word MVP site:
http://word.mvps.org/
Woody's Lounge:
http://www.wopr.com/cgi-bin/w3t/postlist.pl?Cat=&Board=wrd
But if you can't find what you need in those places, send your question
here:
mailto:he-@editorium.com
I'll put your question in the newsletter to see if some astute reader
knows the answer.
_____________________________________________________
I *love* SpamArrest. After unsuccessfully trying to fight the battle
against junk email with a couple of top-notch programs, I decided to try
SpamArrest, and I'm thrilled to say it's actually won the war. Boy, has
my email been quiet! When people send me an email message, they receive
a message in return asking them to click a link to register themselves
(a one-time operation) as someone who can send me email. Spammers, of
course, won't bother to do this, which basically means no more spam!
It's easy to preregister family, friends, associates, and email
newsletters. The online program (no software installed on your computer)
provides complete control over how spam is handled, and it's very easy
to use. You can try SpamArrest for 30 days at no charge. To learn more,
click here:
http://spamarrest.com/affl?1403707
And if you decide to sign up, please do so through that affiliate link.
Your support will help keep Editorium Update alive and kicking. Thanks!
_____________________________________________________
TELL A FRIEND ABOUT EDITORIUM UPDATE
Thanks for subscribing to Editorium Update. We publish the newsletter
free of charge, asking only that you forward it to friends and
associates who might find it useful. (Please get their approval before
you send it.) We'd also appreciate your suggestions for newsletter
articles and improvements. Please email your comments here:
mailto:edi-@editorium.com.
You can read past issues of the newsletter here:
http://www.editorium.com/euindex.htm
_____________________________________________________
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 © 2006 by the Editorium. All rights reserved. Editorium Update
and Editorium are trademarks of the Editorium.
You may manually forward Editorium Update in its entirety to 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 strictly prohibited. If you're
interested in reprinting one of our articles, please send an email
message here: mailto:repr-@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
If you haven't subscribed to Editorium Update but would like to, send a
blank email message here: mailto:editorium--@topica.com.
To unsubscribe, send a blank email message here:
mailto:editorium-u-@topica.com.
We do not sell, rent, or give our subscriber list to anyone.
____________________________________________________
|
|
 |
|