{"id":112,"date":"2002-05-08T12:00:00","date_gmt":"2002-05-08T12:00:00","guid":{"rendered":"http:\/\/editorium.com\/archive\/?p=112"},"modified":"2013-10-25T23:10:20","modified_gmt":"2013-10-25T23:10:20","slug":"shifting-styles-part-4","status":"publish","type":"post","link":"https:\/\/editorium.com\/archive\/shifting-styles-part-4\/","title":{"rendered":"Shifting Styles, Part 4"},"content":{"rendered":"<p>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.<\/p>\n<p>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:<\/p>\n<p>1. Click the \"Format\" menu.<\/p>\n<p>2. Click \"AutoFormat.\"<\/p>\n<p>3. Click the \"Options\" button.<\/p>\n<p>4. Click the tab labeled \"AutoFormat As You Type.\"<\/p>\n<p>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.<\/p>\n<p>6. Click the \"OK\" button.<\/p>\n<p>7. Click the \"Close\" button.<\/p>\n<p>Now, in a new document, do this:<\/p>\n<p>1. Type \"My Heading\" (without the quotation marks), and be sure not to type any punctuation after it.<\/p>\n<p>2. Hit the Enter key twice.<\/p>\n<p>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.<\/p>\n<p>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.<\/p>\n<p>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:<\/p>\n<p>\"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.'\"<\/p>\n<p>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.<\/p>\n<\/p>\n<p>_________________________________________<\/p>\n<p>READERS WRITE<\/p>\n<p>On April 10, Editorium Update featured a macro to convert typed-in fractions (like 1\/2) into typographically acceptable ones (like 1\/2). You can read the article here:<\/p>\n<p>http:\/\/www.topica.com\/lists\/editorium\/read\/message.html?mid=1710035169<\/p>\n<p>In the article, I wrote, \"I owe my thanks to Wordmeister Steve Hudson 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.<\/p>\n<p>If you don't know how to use macros like this one, you can learn more <a href=\"https:\/\/editorium.com\/archive\/using-found-macros\/\" target=\"_blank\">here.<\/a><\/p>\n<p>You might also want to create a toolbar button for the macro, which you can learn about here:<\/p>\n<p>http:\/\/www.topica.com\/lists\/editorium\/read\/message.html?mid=1707286867<\/p>\n<p>And now, the macro:<\/p>\n<pre><span style=\"color: black; font-family: Courier New; font-size: small;\">'THE MACRO STARTS HERE\nPrivate Const msgNoFraction As String = \"No fractions found.\"\nPrivate Const hitInfo As String = \"Information\"\nPublic Sub TextFormatAllFractions()\nSystem.Cursor = wdCursorWait\nIf FractionFormatting = 0 Then MsgBox msgNoFraction, , hitInfo\nSystem.Cursor = wdCursorNormal\nEnd Sub\nPublic Function FractionFormatting(Optional Scope As Range) As Long\n'returns the number of entries formatted\n'formats 123\/456 with super and subscript\n'The Word Heretic\nConst Search As String = \"[0-9]@^47[0-9]@\"\nDim Fractionator As String\nDim Divisor As Range\nDim Dividend As Range\nDim Slash As Range\nDim Finder As Range\nDim TestStart As Range\nDim TestEnd As Range\nDim IsFraction As Boolean\nDim StartChar As String\nDim EndChar As String\nConst UrlText As String = \"?%#_|$\/\"\nIf Scope Is Nothing Then Set Scope =\nActiveDocument.StoryRanges(wdMainTextStory)\nFractionator = ChrW$(8260) 'unicode\nSet Finder = ActiveDocument.StoryRanges(wdMainTextStory)\nFinder.Collapse\nWith Finder.Find\n.Text = Search\n'only search forwards\n.Forward = True\n.Wrap = wdFindStop\n.MatchWildcards = True\nWhile .Execute(replace:=wdReplaceNone)\nFractionFormatting = True\nSet Divisor = Finder.Duplicate\nSet Dividend = Finder.Duplicate\n'divisor is the bit at the end\n'so move start until we find a slash\nDivisor.MoveStartUntil cset:=\"\/\"\n'then move just past it\nDivisor.MoveStart unit:=wdCharacter, Count:=1\n' now make sure we get the rest of the number\n' (Word's Find wildcards feature sux)\nDivisor.MoveEndWhile cset:=\"0123456789\"\n'dividend is the bit at the start\n'so start from the beginning\nDividend.Collapse\n'include everything up to the slash\nDividend.MoveEndUntil cset:=\"\/\"\n'The slash is right after our dividend\nSet Slash = Dividend.Duplicate\n'so start at the end\nSlash.Collapse wdCollapseEnd\n'and move forward 1!\nSlash.MoveEnd unit:=wdCharacter, Count:=1\n'Now, test if it is a fraction or part of a bigger formula.\n'First, get the chars immediately before and after\nSet TestStart = Dividend.Duplicate\nTestStart.Collapse\nTestStart.MoveStart unit:=wdCharacter, Count:=-1\nSet TestEnd = Divisor.Duplicate\nTestEnd.Collapse Direction:=wdCollapseEnd\nTestEnd.MoveEnd unit:=wdCharacter, Count:=1\nStartChar = TestStart.Text\nEndChar = TestEnd.Text\nIsFraction = True 'innocent until proven guilty\n'Check if this is a field. Its probably a hyperlink or similar\n'So don't process it\nIf Slash.Fields.Count > 0 Then IsFraction = False\n'Test for some obvious false positives\nIf (LCase$(EndChar) >= \"a\" And LCase$(EndChar) <= \"z\") Or _\n(LCase$(StartChar) >= \"a\" And LCase$(StartChar) <= \"z\") Or _\nInStr(1, UrlText & \".\", StartChar) > 0 Or _\nInStr(1, UrlText, EndChar) > 0 Then IsFraction = False\nIf IsFraction Then\n'set the styles at LAST!\nDividend.Font.Superscript = True\nDivisor.Font.Subscript = True\nSlash.Text = Fractionator\nFractionFormatting = FractionFormatting + 1\nEnd If\n'Now, set the find range so we find\n'the next fraction\nFinder.Collapse wdCollapseEnd\nWend\nEnd With\nEnd Function\n'THE MACRO ENDS HERE\n<\/pre>\n<p><\/span><\/p>\n<p>_________________________________________<\/p>\n<p>RESOURCES<\/p>\n<p>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:<\/p>\n<p>http:\/\/www.oootraining.com\/QwikAndDirty\/QwikAndDirtyWordWeb\/qwikword.htm<\/p>\n<p>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.\"<\/p>\n<p>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.<\/p><\/p>\n","protected":false},"excerpt":{"rendered":"<a href=\"https:\/\/editorium.com\/archive\/shifting-styles-part-4\/\" rel=\"bookmark\" title=\"Permalink to Shifting Styles, Part 4\"><p>You&#8217;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&#8217;s Heading 1 style. You&#8217;ve just discovered one of the wonders of Word&#8217;s AutoFormat feature, [&hellip;]<\/p>\n<\/a>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[3],"tags":[],"class_list":{"0":"post-112","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-editing","7":"h-entry","8":"hentry"},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p3gfno-1O","_links":{"self":[{"href":"https:\/\/editorium.com\/archive\/wp-json\/wp\/v2\/posts\/112","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/editorium.com\/archive\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/editorium.com\/archive\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/editorium.com\/archive\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/editorium.com\/archive\/wp-json\/wp\/v2\/comments?post=112"}],"version-history":[{"count":3,"href":"https:\/\/editorium.com\/archive\/wp-json\/wp\/v2\/posts\/112\/revisions"}],"predecessor-version":[{"id":806,"href":"https:\/\/editorium.com\/archive\/wp-json\/wp\/v2\/posts\/112\/revisions\/806"}],"wp:attachment":[{"href":"https:\/\/editorium.com\/archive\/wp-json\/wp\/v2\/media?parent=112"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/editorium.com\/archive\/wp-json\/wp\/v2\/categories?post=112"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/editorium.com\/archive\/wp-json\/wp\/v2\/tags?post=112"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}