Welcome Guest!
 Editorium Update
 Previous Message All Messages Next Message 
Editorium Update: Shifting Styles, Part 4  The Editorium
 May 08, 2002 11:13 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 or send a blank email
message here: mailto:in-@editorium.com.

______________________________________________________

EDITORIUM UPDATE
Tips for Publishing Professionals Using Microsoft Word
May 8, 2002
______________________________________________________

CONTENTS

1. Shifting Styles, Part 4. The evils of AutoFormat--and how to turn it
off.

2. Readers Write. Steve Hudson's elegant Fractionator macro.

3. Resources. Qwik and Dirty Task Guide for Microsoft Word.

______________________________________________________

Are your deadlines looming? Are you tired of working twelve-hour days?
Try our programs! They'll save time and improve quality on every
project. You can learn more here:
http://www.editorium.com

You can buy our book, Total Word Domination, in PDF form here:
http://ebooks.whsmith.co.uk/eBookCover.asp?eBookID=9717

Or, you can buy it for Microsoft Reader here:
http://www.amazon.com/exec/obidos/ASIN/B00005R1ZO/

______________________________________________________

SHIFTING STYLES, PART 4
By Jack M. Lyon (mailto:edi-@editorium.com)

You're typing along, and suddenly the short line you entered a couple of
paragraphs earlier has turned big and bold. Who does it think it is,
anyway? When you investigate, you discover that the line has somehow
been formatted with Word's Heading 1 style.

You've just discovered one of the wonders of Word's AutoFormat feature,
which should be firmly beaten into submission before it takes over your
whole document. If you want to see how it works, try this:

     1. Click the "Format" menu.

     2. Click "AutoFormat."

     3. Click the "Options" button.

     4. Click the tab labeled "AutoFormat As You Type."

     5. Under "Apply as you type," put a check in the box labeled
"Headings." If there's already a check there, you've found the source of
your anguish.

     6. Click the "OK" button.

     7. Click the "Close" button.

Now, in a new document, do this:

     1. Type "My Heading" (without the quotation marks), and be sure not
to type any punctuation after it.

     2. Hit the Enter key twice.

Wow, the text is now formatted with the Heading 1 style. You might think
that's kind of neat, but what if you didn't *want* the text to be a
heading? What if you were just typing a list of items without ending
punctuation (which, by the way, seems to be the defining factor here)?
Then you need to turn the feature off.

See, the whole issue is one of control. How much "help" do you want
Microsoft Word to give you? If you're editing, your answer may be
"none," because editors need to have complete control over what's
happening, and they can't have Word introducing changes that they may
not even be aware of. When I'm editing, I allow one AutoFormat
option--replace "straight quotes" with "smart quotes" as I type--and I
watch it like a hawk.

If you turn off the AutoFormat option to apply headings as you type, and
you *still* get automatic formatting, you may still have the last
"AutoFormat As You Type" option turned on. It's labeled "Define styles
based on your formatting," and the Tooltip Help explains its function:

"Create new paragraph styles based on the manual formatting you apply in
your documents. You can apply these styles in your document to save time
and to give your documents a consistent 'look.'"

The idea that Word is creating new styles as I work just gives me the
heebie-jeebies. This is one option I'm definitely going to keep turned
off.

____________________________________________________

READERS WRITE

On April 10, Editorium Update featured a macro to convert typed-in
fractions (like 1/2) into typographically acceptable ones (like ½). You
can read the article here:

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

In the article, I wrote, "I owe my thanks to Wordmeister Steve Hudson
(here-@tdfa.com) for the idea. Steve would probably take a more
elegant approach, but this macro will definitely work." Well, by golly,
Steve did create a beauty of a macro (the Fractionator) that even
watches out for dates (4/10/2001, for example) and URLs and leaves them
alone, while still creating beautiful fractions. Many thanks to Steve
for this useful tool, and for his comments throughout the macro to
explain what is going on.

If you don't know how to use macros like this one, you can learn more
here:

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

You might also want to create a toolbar button for the macro, which you
can learn about here:

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

And now, the macro:

'MACRO STARTS HERE
Private Const msgNoFraction As String = "No fractions found."
Private Const hitInfo As String = "Information"

Public Sub TextFormatAllFractions()
System.Cursor = wdCursorWait
If FractionFormatting = 0 Then MsgBox msgNoFraction, , hitInfo
System.Cursor = wdCursorNormal
End Sub


Public Function FractionFormatting(Optional Scope As Range) As Long
'returns the number of entries formatted
'formats 123/456 with super and subscript
'The Word Heretic - here-@tdfa.com
Const Search As String = "[0-9]@^47[0-9]@"
Dim Fractionator As String
Dim Divisor As Range
Dim Dividend As Range
Dim Slash As Range
Dim Finder As Range
Dim TestStart As Range
Dim TestEnd As Range
Dim IsFraction As Boolean
Dim StartChar As String
Dim EndChar As String
Const UrlText As String = "?%#_|$/"

If Scope Is Nothing Then Set Scope =
ActiveDocument.StoryRanges(wdMainTextStory)
Fractionator = ChrW$(8260) 'unicode
Set Finder = ActiveDocument.StoryRanges(wdMainTextStory)
Finder.Collapse
With Finder.Find
   .Text = Search
   'only search forwards
   .Forward = True
   .Wrap = wdFindStop
   .MatchWildcards = True
   While .Execute(replace:=wdReplaceNone)
      FractionFormatting = True
      Set Divisor = Finder.Duplicate
      Set Dividend = Finder.Duplicate

      'divisor is the bit at the end
      'so move start until we find a slash
      Divisor.MoveStartUntil cset:="/"
      'then move just past it
      Divisor.MoveStart unit:=wdCharacter, Count:=1
      ' now make sure we get the rest of the number
      ' (Word's Find wildcards feature sux)
      Divisor.MoveEndWhile cset:="0123456789"

      'dividend is the bit at the start
      'so start from the beginning
      Dividend.Collapse
      'include everything up to the slash
      Dividend.MoveEndUntil cset:="/"

      'The slash is right after our dividend
      Set Slash = Dividend.Duplicate
      'so start at the end
      Slash.Collapse wdCollapseEnd
      'and move forward 1!
      Slash.MoveEnd unit:=wdCharacter, Count:=1

      'Now, test if it is a fraction or part of a bigger formula.
      'First, get the chars immediately before and after
      Set TestStart = Dividend.Duplicate
      TestStart.Collapse
      TestStart.MoveStart unit:=wdCharacter, Count:=-1
      Set TestEnd = Divisor.Duplicate
      TestEnd.Collapse Direction:=wdCollapseEnd
      TestEnd.MoveEnd unit:=wdCharacter, Count:=1
      StartChar = TestStart.Text
      EndChar = TestEnd.Text
      IsFraction = True 'innocent until proven guilty

      'Check if this is a field. Its probably a hyperlink or similar
      'So don't process it
      If Slash.Fields.Count > 0 Then IsFraction = False
      'Test for some obvious false positives
      If (LCase$(EndChar) >= "a" And LCase$(EndChar) <= "z") Or _
          (LCase$(StartChar) >= "a" And LCase$(StartChar) <= "z") Or _
          InStr(1, UrlText & ".", StartChar) > 0 Or _
          InStr(1, UrlText, EndChar) > 0 Then IsFraction = False

      If IsFraction Then
         'set the styles at LAST!
         Dividend.Font.Superscript = True
         Divisor.Font.Subscript = True
         Slash.Text = Fractionator
         FractionFormatting = FractionFormatting + 1
      End If

      'Now, set the find range so we find
      'the next fraction
      Finder.Collapse wdCollapseEnd
   Wend
End With
End Function
'MACRO ENDS HERE


If you have questions, macros, hints, or comments you'd like to share,
send an email message here: mailto:hin-@editorium.com

____________________________________________________

RESOURCES

Speaking of Steve Hudson, Steve sent a bunch of his favorite resources,
one of which is the Qwik and Dirty Task Guide for Microsoft Word:

http://www.oootraining.com/QwikAndDirty/QwikAndDirtyWordWeb/qwikword.htm

The Web site notes, "We'll show you how to do multi-step tasks in
Microsoft Word by guiding you through the screen sequences. Scroll down,
as needed. We use very few words, but realistic examples."

The site features clear, illustrated, step-by-step instructions for
using various features of Microsoft Word, and a handy table of contents
for easy navigation. Especially if you're just starting out with Word,
you'll find this site invaluable.


If you'd like to tell us about a resource that others might find useful,
please email us here: mailto:resou-@editorium.com

_____________________________________________________


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 at
http://www.editorium.com/euindex.htm.

_____________________________________________________

THE FINE PRINT

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

The EDITORIUM
Microsoft Word Add-Ins for Publishing Professionals
http://www.editorium.com

Copyright © 2002 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.
	
 Previous Message All Messages Next Message 
  Check It Out!

  Topica Channels
 Best of Topica
 Art & Design
 Books, Movies & TV
 Developers
 Food & Drink
 Health & Fitness
 Internet
 Music
 News & Information
 Personal Finance
 Personal Technology
 Small Business
 Software
 Sports
 Travel & Leisure
 Women & Family

  Start Your Own List!
Email lists are great for debating issues or publishing your views.
Start a List Today!

© 2001 Topica Inc. TFMB
Concerned about privacy? Topica is TrustE certified.
See our Privacy Policy.