{"id":196,"date":"2004-05-12T12:00:00","date_gmt":"2004-05-12T12:00:00","guid":{"rendered":"http:\/\/editorium.com\/archive\/?p=196"},"modified":"2013-10-25T23:10:21","modified_gmt":"2013-10-25T23:10:21","slug":"editorial-style-sheet-macro","status":"publish","type":"post","link":"https:\/\/editorium.com\/archive\/editorial-style-sheet-macro\/","title":{"rendered":"Editorial Style Sheet Macro"},"content":{"rendered":"<p>Last week's newsletter provided a style sheet that editors can use to keep track of style decisions while editing in Microsoft Word. If you didn't get that style sheet, you can download it here:<\/p>\n<p>http:\/\/www.editorium.com\/ftp\/stylesheet.zip<\/p>\n<p>Hilary Powers was kind enough to provide her StyleThat macro in last week's newsletter, and this week I've adapted that macro to work with the editorial style sheet. If you select some text in a document you're editing and then run this macro, it will switch to your editorial style sheet and paste the text under the alphabetical heading where it belongs: ABCD, EFGH, and so on. See last week's newsletter for more information:<\/p>\n<p>http:\/\/lists.topica.com\/lists\/editorium\/read\/message.html?mid=1716659834<\/p>\n<p>And now, here's the macro:<\/p>\n<pre><span style=\"color: black; font-family: Courier New; font-size: small;\">'THE MACRO STARTS HERE\nSub StyleThat()\n'Macro adapted by Hilary Powers 1\/30\/04; updated 4\/6\/04\n'Adapted by Jack M. Lyon for use with editorial style sheet\nIf Selection.Type = wdSelectionIP Then  'No selection\nGoTo HedBack\nElse\nFirstChar = Asc(Selection.Characters.First)\nIf FirstChar > 64 And FirstChar < 69 Then MySearch = \"ABCD^p\"\nIf FirstChar > 68 And FirstChar < 73 Then MySearch = \"EFGH^p\"\nIf FirstChar > 72 And FirstChar < 77 Then MySearch = \"IJKL^p\"\nIf FirstChar > 76 And FirstChar < 81 Then MySearch = \"MNOP^p\"\nIf FirstChar > 80 And FirstChar < 85 Then MySearch = \"QRST^p\"\nIf FirstChar > 84 And FirstChar < 91 Then MySearch = \"UVWXYZ^p\"\nIf FirstChar > 96 And FirstChar < 101 Then MySearch = \"ABCD^p\"\nIf FirstChar > 100 And FirstChar < 105 Then MySearch = \"EFGH^p\"\nIf FirstChar > 104 And FirstChar < 109 Then MySearch = \"IJKL^p\"\nIf FirstChar > 108 And FirstChar < 113 Then MySearch = \"MNOP^p\"\nIf FirstChar > 112 And FirstChar < 117 Then MySearch = \"QRST^p\"\nIf FirstChar > 116 And FirstChar < 123 Then MySearch = \"UVWXYZ^p\"\nIf FirstChar > 90 And FirstChar < 97 Then MySearch = \"Comments:^p\"\nIf FirstChar < 65 Or FirstChar > 122 Then MySearch = \"Comments:^p\"\nSelection.Copy\nWordBasic.NextWindow\nWordBasic.StartOfDocument\nSelection.Find.ClearFormatting\nWith Selection.Find\n.Text = MySearch\n.Forward = True\n.Wrap = wdFindStop\n.Format = False\n.MatchCase = True\n.MatchWholeWord = False\n.MatchAllWordForms = False\n.MatchSoundsLike = False\n.MatchWildcards = False\nEnd With\nSelection.Find.Execute\nSelection.MoveRight\nSelection.Paste\nSelection.TypeParagraph\nGoTo Final\nEnd If\nHedBack:\nWordBasic.NextWindow\nSelection.MoveRight Unit:=wdCharacter, Count:=1\nFinal:\nEnd Sub\n'THE MACRO ENDS HERE\n<\/pre>\n<p><\/span><\/p>\n<p>If you don't know how to use such macros, you can find out <a href=\"https:\/\/editorium.com\/archive\/using-found-macros\/\" target=\"_blank\">here.<\/a><\/p>\n<p>And you can learn how to assign them to a hot key here:<\/p>\n<p>http:\/\/www.topica.com\/lists\/editorium\/read\/message.html?mid=1713088939<\/p>\n<p>Note that you don't have to use the macro with *my* style sheet. It will work with any document in which you've included the following headings, each followed by a carriage return:<\/p>\n<p>ABCD<\/p>\n<p>EFGH<\/p>\n<p>IJKL<\/p>\n<p>MNOP<\/p>\n<p>QRST<\/p>\n<p>UVWXYZ<\/p>\n<p>Comments:<\/p>\n<\/p>\n<p>_________________________________________<\/p>\n<p>READERS WRITE<\/p>\n<p>Last week, expert word whacker Hilary Powers sent her StyleThat macro, which I proceeded to gum up. The problem was, it didn't want to work correctly in Word 2000; possibly some of the commands are specific to Word 2003. At any rate, here is Hilary's macro in its pristine state, and many thanks to her for providing it.<\/p>\n<p>Hilary wrote, \"The macro relies on having two [and only two] files open at a time. The truly charming thing is that you can use one hot key for both chores: putting something on the style sheet and also priming the style sheet for its next use and returning to the main document.<\/p>\n<pre><span style=\"color: black; font-family: Courier New; font-size: small;\">'THE MACRO STARTS HERE\nSub StyleThat()\n' Macro adapted by Hilary Powers 1\/30\/04; updated 4\/6\/04\nIf Selection.Type = wdSelectionIP Then\nGoTo HedBack\nElse\nSelection.Copy\nWordBasic.NextWindow\nSelection.PasteAndFormat (wdPasteDefault)\nGoTo Final\nEnd If\nHedBack:\nSelection.TypeParagraph\nWordBasic.NextWindow\nSelection.MoveRight Unit:=wdCharacter, Count:=1\nFinal:\nEnd Sub\n'THE MACRO ENDS HERE\n<\/pre>\n<p><\/span><\/p>\n<p>If you don't know how to use such macros, you can find out <a href=\"https:\/\/editorium.com\/archive\/using-found-macros\/\" target=\"_blank\">here.<\/a><\/p>\n<p>And you can learn how to assign them to a hot key here:<\/p>\n<p>http:\/\/www.topica.com\/lists\/editorium\/read\/message.html?mid=1713088939<\/p>\n<\/p>\n<p>_________________________________________<\/p>\n<p>RESOURCES<\/p>\n<p>I've been fighting the battle against spam (junk email) but not very effectively, even though I've tried a couple of top-notch spam-fighting programs. Then this week I decided to try SpamArrest, and I'm thrilled to say it's actually won the war. Boy, has my inbox been quiet.<\/p>\n<p>When people send me an email message, they receive an email message in return that asks them to click a link to register themselves (a one-time operation) as someone who can send me messages. 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 to which I subscribe. The completely online program (no software involved) gives me complete control over how spam is handled, and it's very easy to use.<\/p>\n<p>If you'd like to know more, click here:<\/p>\n<p>http:\/\/spamarrest.com\/affl?1403707<\/p>\n<p>And if you decide to sign up, please do so through the link above. Since I'm now a SpamArrest affiliate, your support will help keep Editorium Update alive and kicking. Thanks!<\/p><\/p>\n","protected":false},"excerpt":{"rendered":"<a href=\"https:\/\/editorium.com\/archive\/editorial-style-sheet-macro\/\" rel=\"bookmark\" title=\"Permalink to Editorial Style Sheet Macro\"><p>Last week&#8217;s newsletter provided a style sheet that editors can use to keep track of style decisions while editing in Microsoft Word. If you didn&#8217;t get that style sheet, you can download it here: http:\/\/www.editorium.com\/ftp\/stylesheet.zip Hilary Powers was kind enough to provide her StyleThat macro in last week&#8217;s newsletter, and this week I&#8217;ve adapted that [&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-196","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-3a","_links":{"self":[{"href":"https:\/\/editorium.com\/archive\/wp-json\/wp\/v2\/posts\/196","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=196"}],"version-history":[{"count":3,"href":"https:\/\/editorium.com\/archive\/wp-json\/wp\/v2\/posts\/196\/revisions"}],"predecessor-version":[{"id":835,"href":"https:\/\/editorium.com\/archive\/wp-json\/wp\/v2\/posts\/196\/revisions\/835"}],"wp:attachment":[{"href":"https:\/\/editorium.com\/archive\/wp-json\/wp\/v2\/media?parent=196"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/editorium.com\/archive\/wp-json\/wp\/v2\/categories?post=196"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/editorium.com\/archive\/wp-json\/wp\/v2\/tags?post=196"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}