AuthorsDen.com   Join | Login    
Where Authors and Readers come together!

SIGNED BOOKS    AUTHORS    BOOKS    SAMPLE CHAPTERS    AUDIOBOOKS    eBOOKS    STORIES    ARTICLES    POETRY    BLOGS    NEWS    VIDEOS    SUCCESS    TESTIMONIALS

Featured Authors:  Dave Tabler, iEva Pasco, i Armand, iJohn Henning, iJoy Pedersen, iArmineh Ohanian, iSusan Smith, iDebra Kraft, iMatt Miller, iDavid Schwinghammer, i

  Home > Mystery/Suspense > Articles Popular: Books, Stories, Articles, Poetry      Authors: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z     

John Patrick Lamont

 Follow Me  

· Contact Me
· Books
· Articles
· 8 Titles
· 1 Reviews
· Save to My Library
· Share with Friends!
·
Member Since: Apr, 2008

John Patrick Lamont, click here to update your pages on AuthorsDen.


Style Sheets - Author's Writing Tools
by John Patrick Lamont   
Rated "G" by the Author.
     
Recent articles by
John Patrick Lamont

• Burnt Offerings – Sacrificing Insurance and Investment Clients
• Client Enslavement Using Golden Handcuffs and Intimidation
• Corporate Body Snatching and Client Rustling
• Help For Word Frequency Macro
• Register Your Copyright Electronically
           >> View all

Build effective style sheets with this handy MS Word macro.

Being largely self-taught, I have spent a lot of time searching the Internet for tools to improve my writing.  Here's one I'd like to share that I found especially useful for building style sheets.

 

To build my style sheets for my book, Sum of Life - The Worst Kind of Lies, I needed a fast and easy way to identify the unique words in my manuscript.  Once created, my style sheet was given to my copy-editor and proofreaders to decrease confusion about what word I intended and to eliminate wasted time with unnecessary corrections.  I've found that the word processor’s grammar, punctuation and spell checker wasn't useful for much more than a first or second pass through a document.  Many times it not only caused confusion, but also suggested the wrong solution.  A good style sheet is a handy time saving tool that everyone involved in the production of the manuscript can use.

 

Since I use MS Word, I assumed that using an automating macro was a logical way to build my style sheet.  The last thing I wanted to do was to spend hours poring through the book trying to separate unique words.  Unfortunately, my programming skills are limited.  I can understand the logic within someone else's program and possibly alter it, but the actual creation of anything complex is beyond me.  Luckily, a few searches on the Internet yielded a site with handy programming tips for MS Word.

 

http://wordtips.vitalnews.com/

 

Allen Wyatt's site contains macros for many applications.  The one that helped me was the word frequency macro.

 

http://wordtips.vitalnews.com/Pages/T001833_Generating_a_Count_of_Word_Occurrences.html

 

What this macro does is identify all unique words in a document, count how many times the words are used and then list them with their usage alphabetically on a separate Word document.  When you run the macro, it gives you a choice to sort either by word or frequency.  Frequency lists the most commonly used words first.  Word lists the words in alphabetical order.

 

In my case with a 500+ word manuscript, the macro created a single column document of over 250 pages.  Once the list of unique words was created, I not only had the raw data for building my style sheet, but I found I could use the list as a secondary spell checker.  By scanning through the list I was able to find correctly spelled yet redundant words, words I mistakenly told the spell checker to ignore, and words that may have been used too often.  The macro gave me a fast and effective way of analyzing my writing.

 

Personally, I find that the verb "said" quickly becomes monotonous when reading fiction.  Since the macro adds up all the occurrences of each word, it gives me a handy reference to how much editing of "said" words is necessary.  Other verbs like "thought" and "asked" are also examples that are handy to have a count of.  Substituting more interesting, diverse and more descriptive verbs is a simple matter using the Find feature in MS Word.

 

Unfortunately, the macro isn’t perfect.  My style sheet needed even more help from the word count macro, but, because of its limitations, it took a little extra work to get it.  Proper hyphenation better communicates the true intended definition of many words, but the macro ignores hyphens.  The easiest solution for me to add hyphenated words to my style sheet was to use Find and Replace.  By simply Find(ing) all the hyphens and Replace(ing) them with a six-digit number (like 867345), when I ran the macro, my raw data list of unique words included words like good867345looking.  Once the new list of words was created, reversing the Find and Replace restored all the hyphens and made the list good-looking!

 

A minor change I made to the original macro program was to expand the amount of words it would find and process, plus I needed it to find and count some rather unusually spelled slang words that began with an apostrophe.  An example would be “’bout” for the properly spelled word “about.”  Since the slang was intended to be included in the style sheet, altering the macro program made it an even more useful tool for my purposes.

 

Below is the fully altered MS Word macro for your use.  Since I only altered it, I take no credit or responsibility for its use.  Make sure all your work is backed up before trying it.  If you do not know how to copy this program and paste it into the Microsoft Visual Basic editor, I suggest you read your manual to familiarize yourself with the procedures.

 

I hope this helps.

John Patrick Lamont

 

 

 Sub WordFrequency1()

'

' WordFrequency1 Macro

    Const maxwords = 20000         'Maximum unique words allowed

    Dim SingleWord As String       'Raw word pulled from doc

    Dim Words(maxwords) As String  'Array to hold unique words

    Dim Freq(maxwords) As Integer  'Frequency counter for unique words

    Dim WordNum As Integer         'Number of unique words

    Dim ByFreq As Boolean          'Flag for sorting order

    Dim ttlwds As Long             'Total words in the document

    Dim Excludes As String         'Words to be excluded

    Dim Found As Boolean           'Temporary flag

    Dim j, k, l, Temp As Integer   'Temporary variables

    Dim ans As String              'How user wants to sort results

    Dim tword As String            '

 

    ' Set up excluded words

    Excludes = "[the][a][of][is][to][for][by][be][and][are]"

 

    ' Find out how to sort

    ByFreq = True

    ans = InputBox("Sort by WORD or by FREQ?", "Sort order", "WORD")

    If ans = "" Then End

    If UCase(ans) = "WORD" Then

        ByFreq = False

    End If

   

    Selection.HomeKey Unit:=wdStory

    System.Cursor = wdCursorWait

    WordNum = 0

    ttlwds = ActiveDocument.Words.Count

 

    ' Control the repeat

    For Each aword In ActiveDocument.Words

        SingleWord = Trim(LCase(aword))

        'Out of range?

        If SingleWord < "a" Or SingleWord = "z" Then

            SingleWord = ""

        End If

        'On exclude list?

        If InStr(Excludes, "[" & SingleWord & "]") Then

            SingleWord = ""

        End If

        If Len(SingleWord) > 0 Then

            Found = False

            For j = 1 To WordNum

                If Words(j) = SingleWord Then

                    Freq(j) = Freq(j) + 1

                    Found = True

                    Exit For

                End If

            Next j

            If Not Found Then

                WordNum = WordNum + 1

                Words(WordNum) = SingleWord

                Freq(WordNum) = 1

            End If

            If WordNum > maxwords - 1 Then

                j = MsgBox("Too many words.", vbOKOnly)

                Exit For

            End If

        End If

        ttlwds = ttlwds - 1

        StatusBar = "Remaining: " & ttlwds & ", Unique: " & WordNum

    Next aword

 

    ' Now sort it into word order

    For j = 1 To WordNum - 1

        k = j

        For l = j + 1 To WordNum

            If (Not ByFreq And Words(l) < Words(k)) _

              Or (ByFreq And Freq(l) > Freq(k)) Then k = l

        Next l

        If k <> j Then

            tword = Words(j)

            Words(j) = Words(k)

            Words(k) = tword

            Temp = Freq(j)

            Freq(j) = Freq(k)

            Freq(k) = Temp

        End If

        StatusBar = "Sorting: " & WordNum - j

    Next j

 

    ' Now write out the results

    tmpName = ActiveDocument.AttachedTemplate.FullName

    Documents.Add Template:=tmpName, NewTemplate:=False

    Selection.ParagraphFormat.TabStops.ClearAll

    With Selection

        For j = 1 To WordNum

            .TypeText Text:=Trim(Str(Freq(j))) _

              & vbTab & Words(j) & vbCrLf

        Next j

    End With

    System.Cursor = wdCursorNormal

    j = MsgBox("There were " & Trim(Str(WordNum)) & _

      " different words ", vbOKOnly, "Finished")

End Sub


Want to review or comment on this article?


Need a FREE Reader Membership?
Popular Mystery/Suspense Articles
  1.  1959 Fatal Car-Train Collision Leads t
  2.  Jane's Buns Mystery: The Missing Ingre
  3.  Gun Crazy (1950)
  4.  What Type Of Sci-Fi Do You Like?
  5.  Book signings will feature author of t
  6.  Author Interview: Amy Pendino
  7.  Sisters Writing Crime
  8.  Book Review: Freedom by R.M. Gauthier
  9.  The Dead Letter--Book Review
  10.  Book Review: Little Greenwood Case by
  11.  The Thin Man--Book Review
  12.  Behind the Scenes in a Troubled Newsro
  13.  Book Review: Virtual Enemies by Sharon
  14.  Las Vegas Mystery
  15.  MyShelf.com Author of the Month
  16.  Dead End
  17.  Book Review: Midnight on Owl Mountain
  18.  Plano Profile Magazine Interviews Will
  19.  TRIVIA MATCH
  20.  The Story Behind Fake
  21.  Dead of Knight-A Jack Staal Mystery -a
  22.  Author Shares her Passion for Stories
  23.  Author Patricia Skalka
  24.  Move Over Grisham
  25.  A Young Woman Tries to Figure Out What

Free Book Review Program
Select a book to read and review today!

Ryan's Ruin (Clear Creek Series # 1) by Trennis Killian

.  
Member BookAds

A Major Hurdle by Patricia Sims

A retired educator who loves writing fiction with emphasis on religion and enjoys singing and writing songs.  
Member BookAds

Vanishing Act in Vegas by MORGAN ST. JAMES

The third book in the funny Silver Sisters Mysteries series. The twins and their 80 year-old mother and uncle get into trouble sleuthing in Sin City. Paperback, Kindle, eBook, Audiobook  
Member BookAds