{"id":178,"date":"2003-12-03T12:00:00","date_gmt":"2003-12-03T12:00:00","guid":{"rendered":"http:\/\/editorium.com\/archive\/?p=178"},"modified":"2013-10-25T23:10:21","modified_gmt":"2013-10-25T23:10:21","slug":"fixing-all-caps-in-text","status":"publish","type":"post","link":"https:\/\/editorium.com\/archive\/fixing-all-caps-in-text\/","title":{"rendered":"Fixing All Caps in Text"},"content":{"rendered":"<p>The newsletter a couple of weeks ago featured a macro that would set all headings in a Word document in true title case, with articles and prepositions lowercased. But what if you have a document in which an author has typed other stuff in all caps--author names in footnotes, or book titles in body text? It would be nice to have a macro that would look for anything in all caps and turn it to title case. I've modified the macro to do just that:<\/p>\n<pre><span style=\"color: black; font-family: Courier New; font-size: small;\">'THE MACRO STARTS HERE\nSub FixAllCapsInText()\n'Macro created 10\/19\/2003 by Jack M. Lyon\nSelection.Find.ClearFormatting\nWith Selection.Find\n.Text = \"[A-Z]{2,}\"\n.Replacement.Text = \"\"\n.Forward = True\n.Wrap = wdFindStop\n.Format = False\n.MatchCase = False\n.MatchWholeWord = False\n.MatchAllWordForms = False\n.MatchSoundsLike = False\n.MatchWildcards = True\nEnd With\nSelection.Find.Execute\nWhile Selection.Find.Found = True\nSelection.Range.Case = wdTitleWord\nSelect Case Selection.Range\nCase \"A\", \"An\", \"As\", \"At\", \"And\", \"But\", _\n\"By\", \"For\", \"From\", \"In\", \"Into\", \"Of\", _\n\"On\", \"Or\", \"Over\", \"The\", \"Through\", _\n\"To\", \"Under\", \"Unto\", \"With\"\nwrd.Case = wdLowerCase\nCase \"Usa\", \"Nasa\", \"Usda\", \"Ibm\", \"Nato\"\nwrd.Case = wdUpperCase\nEnd Select\nSelection.MoveRight Unit:=wdCharacter, Count:=1\nSelection.Find.Execute\nWend\nMsgBox \"Finished!\", , \"Fix All Caps in Text\"\nEnd Sub\n'THE MACRO ENDS HERE\n<\/pre>\n<p><\/span><\/p>\n<p>If you don't know how to use macros like that one, you can learn how here:<\/p>\n<p><https:\/\/editorium.com\/archive\/using-found-macros\/><\/p>\n<p>The key to the macro is this line:<\/p>\n<p>.Text = \"[A-Z]{2,}\"<\/p>\n<p>That tells Word to do a wildcard search for two or more capital letters in a row. If you like, you can make that number larger to avoid such common acronyms as USA and NASA. A better way to take care of such items, however, is to list them in the following line of the macro:<\/p>\n<p>Case \"Usa\", \"Nasa\", \"Usda\", \"Ibm\", \"Nato\"<\/p>\n<p>For more information, see the newsletter here:<\/p>\n<p>http:\/\/www.topica.com\/lists\/editorium\/read\/message.html?mid=1715119894<\/p>\n<p>And the Readers Write column in last week's newsletter here:<\/p>\n<p>http:\/\/www.topica.com\/lists\/editorium\/read\/message.html?mid=1715197755<\/p>\n<p>And if you'd like more information about wildcard searching, feel free to download my paper \"Advanced Find and Replace in Microsoft Word\":<\/p>\n<p>http:\/\/www.editorium.com\/ftp\/advancedfind.zip<\/p>\n<p>Thanks to Linda Northrup for suggesting this topic.<\/p>\n<\/p>\n<p>_________________________________________<\/p>\n<p>READERS WRITE<\/p>\n<p>Jim Pinkham pointed out that the modified macro in last week's Readers Write column had a mistake on one line:<\/p>\n<p>wrd.Case = wdUpperCase   End Select<\/p>\n<p>That should actually be two lines, like this:<\/p>\n<p>wrd.Case = wdUpperCase<\/p>\n<p>End Select<\/p>\n<p>If you had trouble running the macro, that's why.<\/p>\n<p>Johanna Murphy wrote:<\/p>\n<p>\"The Title Case Headings Macro is awesome! Although I would need one where you only change one level at a time. Also, I have created other styles which are named OUT and OUTNUMBER (with only 5 levels) that we use a lot in our law firm.  How can I change the macro to specify those style names?\"<\/p>\n<p>I responded:<\/p>\n<p>To use different styles with the macro, do this:<\/p>\n<p>1. Delete these two lines:<\/p>\n<p>For h = 1 To 9<\/p>\n<p>Next h<\/p>\n<p>2. Modify this line--<\/p>\n<p>myHeading$ = \"Heading\" + Str(h)<\/p>\n<p>--to something like this:<\/p>\n<p>myHeading$ = \"MyStyle\"<\/p>\n<p>Last week 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?\"<\/p>\n<p>Clarke P Gerber responded, \"I've checked several specialist texts (including Chicago Manual of Style; NY Times Manual of Style and Usage) and cannot find any authority for using a circled 'c' as an abbreviation for circa. My own regional bible--The Cambridge Australian English Style Guide--says the following: 'When spelled out in full circa is often italicised. When abbreviated as c. or ca. it is now usually set in roman.'\"<\/p>\n<p>Thanks to Jim, Johanna, and Clarke for their messages.<\/p>\n<\/p>\n<p>_________________________________________<\/p>\n<p>RESOURCES<\/p>\n<p>The Microsoft Office Assistance page has a wealth of resources for Word users, including tips, templates, demos, and quizzes:<\/p>\n<p>http:\/\/office.microsoft.com\/assistance\/<\/p><\/p>\n","protected":false},"excerpt":{"rendered":"<a href=\"https:\/\/editorium.com\/archive\/fixing-all-caps-in-text\/\" rel=\"bookmark\" title=\"Permalink to Fixing All Caps in Text\"><p>The newsletter a couple of weeks ago featured a macro that would set all headings in a Word document in true title case, with articles and prepositions lowercased. But what if you have a document in which an author has typed other stuff in all caps&#8211;author names in footnotes, or book titles in body text? [&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-178","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-2S","_links":{"self":[{"href":"https:\/\/editorium.com\/archive\/wp-json\/wp\/v2\/posts\/178","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=178"}],"version-history":[{"count":3,"href":"https:\/\/editorium.com\/archive\/wp-json\/wp\/v2\/posts\/178\/revisions"}],"predecessor-version":[{"id":831,"href":"https:\/\/editorium.com\/archive\/wp-json\/wp\/v2\/posts\/178\/revisions\/831"}],"wp:attachment":[{"href":"https:\/\/editorium.com\/archive\/wp-json\/wp\/v2\/media?parent=178"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/editorium.com\/archive\/wp-json\/wp\/v2\/categories?post=178"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/editorium.com\/archive\/wp-json\/wp\/v2\/tags?post=178"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}