<

Microsoft Word Template for Writing Experts Exchange Articles

Published on
22,132 Points
10,132 Views
25 Endorsements
Last Modified:
Awarded

Introduction



Authors who set out to write any sort of lengthy piece for online submission—be it a long question or comment on a technical form, an article, or a substantial blog entry—often find it useful to work up a draft in an editor other than a web browser, go through successive drafts, and then paste the resulting text into the web browser at the end.

Indeed, I typically use this approach in writing my own articles, stopping occasionally to paste in the current state of the draft into the EE article submission editor to take advantage of the preview function.

Originally I used Notepad, the ubiquitous text editor, for this function, but I soon became tired of having to remember (and type) the various tags needed for EE’s formatting elements (bold, italic, bullet, subtitle, etc.).

Eventually, I decided to create a Microsoft Word template for my article drafts; the key advantage for doing this is that I could add Visual Basic for Applications (VBA) code to the template to automate application of the various EE Article tags, and to include the “article trailer” idea that I shamelessly stole from EE’s leading Article writer, DanRollins.

This article covers how to install and use this template.  Indeed, I wrote this article using the template.

This template uses the old “*.dot” file type, and thus will work for all versions of Word from Word 2000 through Word 2010, without the need to download the Office 2007 Compatibility Pack.


About Word Templates



In Microsoft Word, a “template” is a special file that contains commonly-used elements, such as:
Styles and themes;
Boilerplate text;
Document layout/design elements such as page set-up, headers, and footers;
Images;
AutoText entries;
Dictionaries;
Toolbars and keyboard shortcuts;
VBA code;
Et cetera.

This article is not intended as a general introduction to Word templates; rather, this article is about a very specific template I developed for authors of Experts Exchange articles.  For readers interested in learning more about Word templates, I recommend starting with the following resources:
Template Basics in Microsoft Word (lots of additional links)


Installing the EE Article Template



To install the EE Article Template, save the file below to your User Templates directory:

EEArticleTemplate.dot

If you are not sure which directory you are using for your User Templates:
In Word 2003 and earlier, select Tools / Options from the menu.  In the Options form, click the File Locations tab
In Word 2007, click the Office button, and then Word Options.  In Word Options, click Advanced, scroll to the General section, and then click File Locations
In Word 2010, select Options from the File menu.  In Word Options, click Advanced, scroll to the General section, and then click File Locations


Create a New Document Using the EE Article Template



To create a new document based on the EE Article Template, please do the following:
In Word 2000, select File / New from the menu.  On the Templates form, click on the General tab, select the EE Article Template from the list, and click OK.
In Word 2002 or 2003, select File / New from the menu.  That will bring up the New Document task pane.  If you do not see the EE Article Template listed under “recently used templates”, then click on the “on my computer” link.  On the Templates form, click on the General tab, select the EE Article Template from the list, and click OK.
In Word 2007, click the Office button, and click New.  In the New Document form, if the template does not appear in the recently used templates under “Blank and Recent”, click “My Templates”
In Word 2010, click the File menu, and click New.  In the New Document form, if the template does not appear in the recently used templates under “Blank and Recent”, click “My Templates”

Now begin typing your new article draft.


Applying EE Article Tags As You Write



The EE Article Template includes support for twelve different types of tags:
Font effects such as bold, italic, and underline;
Document organization elements such as quotes, bullets, steps, indent, and subtitles;
Marking code snippets; and
Off-document references for URLs, embedded files, and embedded images

Whichever tags you select are applied to your current selection.  If your current selection already includes text, that text will be embedded in the selected tag.  If there is no text currently selected, you will simply get placeholder tags at the current insertion point.

To apply these tags, you may use either menus or keyboard shortcuts.  The following keyboard shortcuts are available in the EE Article Template:

Shortcut         Tag          Shortcut         Tag
-----------------------------------------------------------
Alt + Ctrl + C   Code         Alt + Ctrl + 1   Step
Alt + Ctrl + B   Bold         Alt + Ctrl + S   Subtitle
Alt + Ctrl + I   Italic       Alt + Ctrl + Q   Quote
Alt + Ctrl + U   Underline    Alt + Ctrl + L   URL
Alt + Ctrl + T   Bullet       Alt + Ctrl + M   Embed File
Alt + Ctrl + N   Indent       Alt + Ctrl + G   Embed Image

Open in new window


To apply these tags by the menu:
In Word 2003 or earlier, when you create a new document based on the EE Article Template, or open an existing document based on that template, you will see a new menu group, “EE Article”, in your main menu.  Within that group, you will see individual items for the tags
In Word 2007 or later, you will see a new group on the Ribbon, Add-Ins, and in that group you will see a menu header for “EE Article”

The screen shot below displays this menu as it appears in Word 2007.

Word 2007 Ribbon Menu
The same menu structure will be available in the “Text” right-click context menu:

Word 2007 Popup Menu
Additional notes regarding the article tag macros and keyboard shortcuts:
The embedded file and image tags are simply placeholders.  You will have to replace the "######" characters with the actual EE file IDs once you upload them!
The Alt+Ctrl+1 shortcut for inserting a step tag uses the regular numeral 1 from the keyboard, and does not apply to the 1 key in the numeric keypad


Update Your Article Trailer



Like many authors, I suppose, I want to make it easy for readers to find more of my articles.  At present, EE does not make it easy to do this: one would have to click on the link to my profile, scroll down to my articles history, and pick out the articles I have written (as opposed to articles where I may have posted comments).  Many have suggested to EE that they place a “see more articles by MemberX” link in each article, but to date that does not exist.

Early on, EE’s current leading article author, DanRollins, started appending a “trailer” to his articles, which would:
Include a link to a saved search that would return his articles; and
Remind readers to vote on the article

More recently, Dan has refined his thinking on the subject to use a link to his Article History on EE.  This has two significant advantages:
It is easier to implement; and
It better accommodates readers who either are not Members of Experts Exchange, or are but are currently logged out.  (The saved search link does not work in the logged-out view.)


I liked the idea, and so I stole it, and thus this template includes a sample article trailer as follows:

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[b]If you liked this article[/b] and want to see more from this author,  [url="http://www.experts-exchange.com/ARTH_2428436.html?arthOrderBy=3&arthSort=1#arth"]please click here[/url].

[b]If you found this article helpful[/b], please click the [i][b]Yes[/b][/i] button near the:

      Was this article helpful? 

label that is just below and to the right of this text.   [b][i]Thanks![/i][/b]
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Open in new window


If you decide to use your own trailer, you will want to launch Word and open the template itself (that is, “EEArticleTemplate.dot”), and edit that trailer, or remove it, as your tastes dictate.  At a minimum, if you use the trailer, you will have to update the Member ID embedded in the URL; if you do not, then the link will simply point to my articles.  To update, simply replace my Member ID, 2428436, with yours.  To find your Member ID, go to your profile page; your Member ID will be the ####### in the URL, http://www.experts-exchange.com/M_#######.html.

Note:  I see this article trailer as a necessary evil until EE actually implements a way for readers to more easily find additional articles by the same authot.  To that end, I encourage you to lobby EE to implement a real, automatic link for "see more articles by this author".


Update Keyboard Shortcuts



In the Applying EE Article Tags As You Write section, I listed the keyboard shortcuts as I implemented them.  I used the shortcuts that made sense to me; if you prefer different shortcuts, you are free to change them.
In Word 2003 and earlier, select Tools / Customize from the menu.  In the Customize form, click the Keyboard button
In Word 2007 and 2010, click the Office button (File menu in Word 2010), and then Word Options.  In the Word Options form, click Customize.  Click the Customize button next to “Keyboard shortcuts”
In the Customize Keyboard form, select “EEArticleTemplate.dot” for “Save changes in”, and select Macros in the Categories list.  Then select the specific macro you want to change the shortcut assignment for, and remove current key assignments and/or add new key assignments


Reorganize Menus



In addition, if you wish to change the order, the grouping, or the Face IDs of the custom menu, you may, but this will require updating the VBA code in the template file.

Specifically, the procedure MakeMenuAddition uses a constant, Tags, to hold information for building the menu elements.  The constant is defined as follows:

    Const Tags As String = "Code|C|False|472^" & _
        "Bold|B|True|113^" & _
        "Italic|I|False|114^" & _
        "Underline|U|False|115^" & _
        "Bullet|T|True|12^" & _
        "Reduce Bullet Spacing||False|^" & _
        "Indent|N|False|15^" & _
        "Step|1|True|11^" & _
        "Subtitle|S|False|504^" & _
        "Quote|Q|False|1045^" & _
        "URL|L|True|610^" & _
        "Embed File|M|False|565^" & _
        "Embed Image|G|False|965"

Open in new window


This is a delimited string, with the following characteristics:
Use the caret (“^”) character to delimit distinct menu items
Each menu item has four data elements, each delimited by the pipe (“|”) character
The first item is the caption that appears in the menu.  This caption must have a corresponding macro with a name formed by concatenating “Apply” with the caption (first removing any spaces from the caption)
The second item indicates the shortcut key, used in combination with the Alt and Ctrl keys
The third item indicates whether a new group line should precede the menu item
The fourth item indicates the Face ID for the icon assigned to the menu item (to find a Face ID for a favored icon, please see this popular Face ID browser

You can rearrange and update that string to change the order, grouping, and Face IDs in the menus.


=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
If you liked this article and want to see more from this author,  please click here.

If you found this article helpful, please click the Yes button near the:

      Was this article helpful?

label that is just below and to the right of this text.   Thanks!
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
25
Comment
28 Comments
 
LVL 60

Expert Comment

by:Kevin Cross
Patrick,

This is going to come in very handy in the near future.  Works great as I have been using Word lately for same reasons you stated here and had been having to hand type tags each time and so struggled found often I had to switch to Article editor prematurely simply to get the ease of formatting.

This will be a nice addition to my personal Author toolkit.

You have my personal Yes vote above.

Regards,
Kevin
0
 
LVL 38

Expert Comment

by:younghv
Great concept and execution - sure to help Authors and Page Editors make the whole Articles function even better.

"Yes" vote above.
0
 
LVL 74

Expert Comment

by:Glen Knight
Superb article, happy to place my vote above.
0
[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

 
LVL 76

Expert Comment

by:Alan Hardisty
It got my vote too :)

[laughing] Anything to help Demazter gain more article poitns works for me [/laughing]
0
 
LVL 51

Expert Comment

by:Mark Wills
Great article, both from learning how to code your own, and, how to make life easier for writing EE Articles.
0
 
LVL 49

Expert Comment

by:DanRollins
I was kinda hoping to see something that would turn bold text to [b]bold text[/b] (etc.; that is, change WORD's WYSIWYG into EE BBCode.
0
 
LVL 71

Expert Comment

by:Qlemo
That's pretty much easy. Below code will change bold and italics, as an example. Implementing all tags will need a bit more work, and you need to use a particular formatting for e.g. code to replace that via macro.

And you should have the reverting macro EE2Word, of course.
Sub Word2EE()
  With ActiveDocument.Content.Find
    .ClearFormatting
    .Font.Bold = True
    With .Replacement
        .ClearFormatting
        .Font.Bold = False
    End With
    .Execute FindText:="", ReplaceWith:="[b]^&[/b]", Format:=True, Replace:=wdReplaceAll
  End With
  With ActiveDocument.Content.Find
    .ClearFormatting
    .Font.Italic = True
    With .Replacement
        .ClearFormatting
        .Font.Italic = False
    End With
    .Execute FindText:="", ReplaceWith:="[i]^&[/i]", Format:=True, Replace:=wdReplaceAll
  End With

End Sub

Open in new window

0
 
LVL 93

Author Comment

by:Patrick Matthews
Dan,

>>I was kinda hoping to see something that would...change WORD's WYSIWYG into EE BBCode.

Touché :)

Not sure why, but I never really though of that.  Should be easy enough to do for things like bold, italic, and underline; for some of the other items it can get tricky or even impossible.

Qlemo was kind enough to get the ball rolling on that...

Patrick
0
 
LVL 60

Expert Comment

by:Kevin Cross
Nice thought, Dan.
I never really thought of that either as figured clicking Alt+Ctrl+B wasn't that much harder than clicking Ctrl+B, but it could be advantageous to go along writing as normal and if you hit the *wrong* (normal Word shortcuts) that you get BB code -- think this would really just be bold, italic and underline where it would come in most handy since there really is a code block in Word, but guess hitting tab and getting indent might be useful too.

Guess if you dropped in formatted text and were able to have it convert to BB code based on the text face that would be another bonus...

Now you two have me excited for a new version.

In awe as always,

Kevin
0
 
LVL 58

Expert Comment

by:Jim Dettman (Microsoft MVP/ EE MVE)
Wow this is slick and a great idea.  It goes a long way in taking the hassle of formatting articles for EE.

Fantastic contribution!

JimD.

PS. I ditto the awe comment.  I just don't how you guys like you keep managing to churn out this kind of stuff.
0
 
LVL 58

Expert Comment

by:Jim Dettman (Microsoft MVP/ EE MVE)
BTW, this needs to get included for sure in the next EE newsletter.

JimD.
0
 
LVL 32

Expert Comment

by:DrDamnit
You inspired this:

http://www.experts-exchange.com/Web_Development/Blogs/WordPress/A_3746-Wordpress-Plugin-for-Experts-Exchange-Articles.html

A plugin for wordpress that directly translates blog posts to EE Article format.
0
 
LVL 60

Expert Comment

by:Kevin Cross
Patrick, I don't remember this bug when I tested the file originally, so not sure how it was introduced, but anyway it appears that there is a copy and paste error in code:
Sub ApplyQuote()
    
    ApplyTags "Underline"
    
End Sub

Open in new window


Should be:
Sub ApplyQuote()
    
    ApplyTags "Quote"
    
End Sub

Open in new window

0
 
LVL 93

Author Comment

by:Patrick Matthews
Kevin,

Yes, I noticed that myself over the weekend.  I was using the template to write my latest article offline, and was mightily perplexed when I tried to apply the Quote tag :)

Updated file attached.

Patrick
EEArticleTemplate.dot
0
 
LVL 60

Expert Comment

by:Kevin Cross
Thanks!

I am sure I will enjoying reading your new Article also.

Regards,
Kevin
0
 
LVL 18

Expert Comment

by:Ravi Agrawal
Brilliant.
0
 
LVL 93

Author Comment

by:Patrick Matthews
All,

A stylistic tip from DanRollins and Netminder...

To get a little less white space between members of bulleted lists, then instead of:

[bullet]Item 1[/bullet]
[bullet]Item 2[/bullet]
[bullet]Item 3[/bullet]

Open in new window


use:

[bullet]Item 1
[/bullet][bullet]Item 2
[/bullet][bullet]Item 3
[/bullet]

Open in new window


The article rendering engine ignores the trailing linebreak before the closing bullet tag, and not having a linebreak between the bullets cuts down the white space.

To do that conversion quickly, in Word you can hit Ctrl+H for Find/Replace:

Look for: [/bullet]^p[bullet]

Replace with: ^p[/bullet][bullet]

Open in new window


Cheers!
0
 
LVL 75

Expert Comment

by:Michel Plungjan
Will this work on Word for Mac?
0
 
LVL 93

Author Comment

by:Patrick Matthews
Michel,

>>Will this work on Word for Mac?

Not sure, as I have not tested it.  For sure it will not work on Word 2008 for Mac, as that version dropped support for VBA.

Patrick
0
 
LVL 49

Expert Comment

by:DanRollins
That bullet-handling tip is discussed in more detail in my recent article:

      Create an EE Article from a Word Document
      http://www.experts-exchange.com/A_4290.html

...which was written to help when a member has an existing Word document that he wants to convert into an EE article.  It focuses on handling images, but includes tips on subheadings and numbered lists.  

Regarding the Article Trailer:
An alternative option for the "please click here" option (to see a list of the author's other articles) is a URL in the form:

     http://www.experts-exchange.com/ARTH_330221.html?arthOrderBy=3&arthSort=1#arth

... where you replace the digits after ARTH_ with the digits of your member ID.  The advantage is that it works for non-member readers.  The disadvantage is that is shows only titlle, zone, and date of each article.

-- Dan
0
 
LVL 93

Author Comment

by:Patrick Matthews
All,

I have edited this article, and the template file, to include two suggestions from DanRollins:

Changing the URL in the article trailer from using a saved search to using an author's article history; and
Including a macro that uses a formatting trick to reduce the space between members of a bulleted list

Thanks Dan!

Patrick
0
 
LVL 50

Expert Comment

by:Ingeborg Hawighorst (Microsoft MVP / EE MVE)
Hi Patrick, I just submitted my first article today. Unfortunately, I had not found your template yet, but I'll check it out for future use. Suggestion for this article: instead of 1.2 MB images in BMP format, use an image editing tool to convert them to PNG or GIF. They will clock in with a much smaller size. If you snap a screenshot with Word 2010 and then right-click it to save as picture, it will default to PNG. Very handy!

cheers, teylyn
0
 
LVL 93

Author Comment

by:Patrick Matthews
teylyn,

Thanks for that feedback.  I've actually started using PNGs for my more recent images posted to EE, but I haven't gone back and converted the images in my articles.

I had a look at your article, BTW, and your technique looks VERY cool :)

Patrick
0
 
LVL 31

Expert Comment

by:Scott Helmers
Patrick,

A couple of notes to anyone who saves your template for use with Visio 2010.
First, if you decide to save it as a Visio 2010 template, you must save it as a .dotm (macro-enabled) template.
Second, it's necessary to change one constant in the macro. ChangeConst TemplateName As String = "EEArticleTemplate.dot"toConst TemplateName As String = "EEArticleTemplate.dotm"to agree with the new filename created above.
Third, when you create a new document from the template, you must save it as a .docm (macro-enabled) instead of a .dotx document.
Thanks for creating the macros -- now we just need to convince EE to let us post Word content directly and eliminate the need for this foolishness!

Regards,
Scott
 
0
 
LVL 42

Expert Comment

by:dlmille
>>let us post Word content directly and eliminate the need for this foolishness!

You've got that right.  Even Patrick's .DOT template I had to rename, as E-E saved it as .DOC and wasn't useable until I renamed it.

Patrick - nice.  Its neat how sometimes its the simple things that add so much value.  I was contemplating an article and after aikimark's recommendation and reading your article, here, I had enough incentive to give it a shot, starting my article perhaps some time before I would have really "gotten around to it" :)

I was headed down a similar path (just having some shortcuts to put the start/end code on selected text - at least in my mind - so I could write this stuff in Word, as well, as the E-E editor while it works, puts some fear in my heart that maybe IE would crash or wouldn't actually SUBMIT the data when I hit SUBMIT, etc. - before I had the chance to get a SAVE in.

As a result, I'm so glad I did.  I have to say, you have personally impacted me several times with your oh-so-valueable articles!

Ok - request time:  How about when I use an E-E shortcut, make WORD show the effects as well.  Maybe not all, but it could be easy for BOLD marked text could display as BOLD, ITALIC as ITALIC, INDENTED, etc...  However, its an easy copy/paste to the "New Article" for a quick preview.

Cheers and Kudos!  Gotta get back to my article, lol.

Dave
0
 
LVL 71

Expert Comment

by:Qlemo
Dave,
See http:#c19716 as a starter. I'm still working on a WYSIWIG solution in Word, but it is more complicated than you can think of ...
0
 
LVL 42

Expert Comment

by:dlmille
Now that's funny.  I did a couple senior projects in college transcribing CEO to TeX and Word to TeX.  

How come computers haven't just "figured it out" and we still have to twist arms to get work done?
0
 
LVL 61

Expert Comment

by:mbizup
Great stuff, Patrick!
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Join & Write a Comment

This video walks the viewer through the process of creating Hyperlinks for the web and other documents. Select the "Insert" tab: Click "Hyperlink":  Type "http://" followed by a web address to reference a website or navigate to a document to ref…
Office 365 is currently available in five editions. Three of them are for business use: Office 365 Business Essentials, Office 365 Business, and Office 365 Business Premium. Two of them are for home/personal use: Office 365 Home and Office 365 Perso…
Suggested Courses
Course of the Month13 days, 20 hours left to enroll

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month