Seven handy MS Word Macros for content writers.

Content writers, students, journalists and anyone who is writing something keeps coming across a few tasks that have to be repeated. And as we all know, repeat tasks are best done through a macro; it saves time, labour and brings in accuracy. Even more importantly,automating tasks helps you to focus more on what you are doing instead leaving the mouse, punching the keyboard and then grabbing the mouse and so on.

Here are a few macros, useful for Microsoft Word 2007. Maybe they will work for later versions. Please check, if you are using the later versions.

And, one more thing; none of these are 100% original. You would find parts or whole of the code for a few of them on Microsoft Office support and other forums devoted to MS Word. What I have done is to put those macros which are useful to content writers in one place. I have also customised the first three particularly for content writers and tweaked others a bit.

Here is what the seven macros do these for you:

1. Proofread and give readability stats for a portion of a document.

2. Tell you the number of words you have written and the balance number of words you have to write.

3. Keyword density – find how many times a particular word or a group words occur in a document.

4. Take you to the beginning of a document

5. Take you to the beginning of a document

6. Help you to paste content from a website/ another document and automatically format it to match the format of nearby portion in the document.

7. Double EM Dash

1. Check spelling, grammar and readability scores for a portion of the document.

Readability is a critical requirement for content writers because positive response can be expected only when the target audience understand easily what we are saying. FleschKincaid readability is a very useful and built-in tool of MS Word and I am sure majority of the content writers would be dependant on the readability scores for improving the quality of writing.


When you want to check grammar and readability for a portion of the document, you select the portion and click the spelling and grammar checking button. Word immediately asks whether you wish check the rest of the document, you need to say, lookup the readability scores that are displayed and then dismiss the scores. These 4 steps.


A macro can reduce the steps to two. The advantage is not only less number of steps but you don’t need to let your thoughts stray. Try this simple macro, but when you’re using it for the first time, try it on a test document – just a safety precaution.


Sub Spel_Cheker()

Dim ThisDoc As Object

Set ThisDoc = ActiveDocument

Documents.Add DocumentType:=wdNewBlankDocument
Selection.PasteAndFormat (wdPasteDefault)
If Options.CheckGrammarWithSpelling = True Then
End If
ActiveDocument.Close SaveChanges:=wdDoNotSaveChanges

End Sub

2. Balance number of words to be written

Most of the time, content writers have to produce a prescribed number of words. For students writing academic assignments, the word limit assumes even more importance. So is the case for journalists writing articles/ news stories.

MS Word shows  the number of words in the status bar. You can look this up and subtract it from the required word limit to arrive at the balance of words pending. The task is not difficult, but laborious and stymies your thought process.

Here is a simple Word Macro that tells you how many words you have written, balance to be written and percentage of work pending.


Sub BalanceWords()

Dim WordsWritten As Long
Dim TotalNumberWords As Long
Dim Response As String
Dim BalanceWords As Long
Dim PercentWork As Integer

TotalNumberWords = InputBox(“Enter Total number of words you have to write”)

Selection.EndKey Unit:=wdStory

Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:= _
“NUMWORDS “, PreserveFormatting:=True
Selection.HomeKey Unit:=wdLine, Extend:=wdExtend
WordsWritten = Selection

BalanceWords = TotalNumberWords – WordsWritten

PercentWork = (BalanceWords / TotalNumberWords) * 100

Response = “Required Number of words ” & TotalNumberWords & Chr(10) & “Number of words wrritten ” & WordsWritten & Chr(10) & “Balance number of words ” & BalanceWords

Response = Response & Chr(10) & “Pending percentage is ” & PercentWork & “%”

Response = MsgBox(Response, vbOKCancel)

End Sub

3. Keyword density

Google is supposed to have given up keyword density for creating Page Rank. And, it has, as you can see from Google results, awkward phrases such as “Car for hire New York” don’t occur anymore. You get a more sensible “Cars for hire in New York.”


Even then, many SEO companies and clients insist on having a keyword repeated a certain number of times to achieve appropriate keyword density – KWD.  Proofreaders and persons approving content for publishing and of course, the content writers have to track the KWD.


This simple Word Macro does the trick for you. It will count how many times a word or group of words occurs in a document and display the stats. Try this macro and tell me if you want further tweaks.

Sub KountKeyWord()

Dim KeyWorder As String

Dim NumKeyWords As Integer
Dim KeyDensity As Integer
Dim Response As String

Dim TotalNumberWords As Long
Dim KWD As Integer
KeyWorder = Selection
Selection.EndKey Unit:=wdStory

Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:= _
“NUMWORDS “, PreserveFormatting:=True
Selection.HomeKey Unit:=wdLine, Extend:=wdExtend
TotalNumberWords = Selection

Selection.HomeKey Unit:=wdStory
With Selection.Find
.Text = KeyWorder
.Replacement.Text = “”
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
While Selection.Find.Found
NumKeyWords = NumKeyWords + 1

KWD = (NumKeyWords / TotalNumberWords) * 100

Response = MsgBox(“Key word ” & “‘” & KeyWorder & “‘” & ” is repeated ” & NumKeyWords & ” times” & Chr(10) & Chr(10) & “Keyword density is ” & KWD & ” %! ” & vbOKOnly)
End Sub

That is it. You can now easily find KWD anytime with just a click.

4. Go to the beginning of the document.

When working on a lengthy document in MS Word, you would need to go the beginning frequently for checking something or other. Pressing Ctrl+Home is a facility but you’ll have to take hand off the mouse, press two keys – slightly cumbersome for lazy people like me.

Try this one line macro, you can go the beginning of the document with just one click of the mouse. (Of course, you have to link the macro to button and place it on the toolbar.)

Sub Home_Go()

Selection.HomeKey Unit:=wdStory

End Sub

5. Go to the end of the document.

When proofing or editing somewhere in a MS Word document, you may have to go the end of the document. Instead of taking off the hand from the mouse, clicking CTRL+End, try this one line macro. It makes life simpler.

Sub End_Go()

Selection.EndKey Unit:=wdStory

End Sub

6. Make sure pasted content follows formatting of the surrounding text

When copying and pasting content from websites or other documents, you must have been irritated that it brings its formating with it. You have to laboriously reformat it, reset the language and so on. Try this small Word Macro; you will find it saves time and labor. (You have to first copy or cut the content from the source document before invoking this macro)

Sub Text_Paste()

Selection.PasteSpecial DataType:=wdPasteText

End Sub

7. Double EM Dash:

Frustrated about the double EM Dash? If you are an academic writer or a student writing a dissertation and using OSCOLA reference style, you must have faced the tedious task — typing the Double EM dash” — “. MS Word is as usual more than (and over?) helpful. It offers three ways to type the double em dash; you can type CTRL+ALT+minus on the numeric keypad. Or insert the special character from the Insert menu. A more complicated method is ALT+0151. None of these are workable, when you are concentrating on writing an article.

Try this macro. It will make life simpler.

Sub EM2()

Selection.TypeText Text:=”–”

End Sub

That’s it. You have easily typed the double EM dash “–“


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s