Creating Word templates with customized help delivered by Clippy
I've been trying to figure this out for about two days, so now that I've actually gotten it to work, I'm posting the instructions here. I'm planning to go back and revise these, but for now, proceed with caution. They're probably not that easy to follow without screenshots.
We have a lot of Wordtemplates that developers use in the software methodology process. The documents all have embedded help, but that makes the document actually quite crowded and is also problematic because the instructions print along with the developers' text in an almost indistinguishable way.
The solution? Deliver the help through Clippy, the paperclip office assistant. This took a little bit of understanding with macros, and the links where the explanations are can be found here: http://www.gmayor.com/installing_macro.htm and http://gregmaxey.mvps.org/document_user_instructions.htm and http://addbalance.com/usersguide/fields.htm#click
The instructions that follow are more like notes to myself.
To deliver customized help through Clippy:
1. Wake Clippy up by going to Help > Show the Office Assistant. If you've disabled Clippy, you must enable him so that he can later appear when conjured.
2. Copy the following code:
Sub AutoNew()
Dim Balloon As Balloon
Set Balloon = Assistant.NewBalloon
With Balloon
.Heading = “{cf 252} Instructions”
.Text = “Complete blocks 1-34 and sign in block 35. Incomplete lease applications will not be accepted.”
.Button = msoButtonSetOK
.Animation = msoAnimationGetAttentionMajor
.Show
End With
End Sub
Note: The name “AutoNew” is this specific macro's name. If you leave it as AutoNew, the macro will automatically display when the template opens. Later we will change this name.
3. In Word, open up a template (by opening up a Word document, then saving it as a template by selecting Template (.dot) in the Save As field when you save it.)
5. Go to Tools > Macro > Macros.
6. In the Macro Name field, type Section1. This will be the unique name we give this macro.
7. In the Macros In drop-down box, select the specific template you're in. (Do not choose Normal because most likely it is protected and read-only.)
8. Click the Create button.
9. The VB editor appears. Look for this code:
Sub Section1()
‘
‘ Section1 Macro
‘ Macro created 12/7/2006 by HP Authorized Customer
‘
End Sub
Note: The word Sub begins and ends the macro. The word Section1 identifies the macro. Think of this like a sandwich, with bread on top and bottom.
10. Gut the middle of the sandwich by deleting the content with asterisks.
11. Paste in the following macro code between the top and bottom:
Dim Balloon As Balloon
Set Balloon = Assistant.NewBalloon
With Balloon
.Heading = “{cf 252} Instructions”
.Text = “Complete blocks 1-34 and sign in block 35. Incomplete lease applications will not be accepted.”
.Button = msoButtonSetOK
.Animation = msoAnimationGetAttentionMajor
.Show
End With
12. Modify the word Instructions and the quoted material in the Text = line. This is your help text.
13. Click the Save button, and then Close the editor by clicking the X in the top-right corner. If you get a message about stopping the debugger, just click OK.
Inserting the Macro in Your Document
1. In your document, click Ctrl+F9. This brings up field brackets that you can insert some macro code into.
2. Type the following. I've included the braces here:
{MACROBUTTON Section1 “Help”}
In this example, MACROBUTTON tells Word what function to do. Section1 is the name of the macro to call. And Help is the name of the text that will appear in the document.
3. Right-click the field and select Toggle Field Codes. The only text that remains is Help.
4. Style the text so that it looks like a link.
The macro is created. When you double-click the link, Clippy appears with your text.
Now, I have several other pieces of code to add:
* For the people who have Clippy disabled, how will they view the help? By typing AutoNew instead of Section1, and by using the following code instead of the office assistant code, you can make a dialog box automatically appear.
Sub AutoNew()
Dim Inst As VbMsgBoxResult
On Error Resume Next
Inst = MsgBox(”Complete blocks 1-34 and sign in block 35. Incomplete lease” & _
” appliations will not be accepted.”, vbOKOnly, “Instructions”)
End Sub
You could tell them that they must enable their office assistant to see the help. Unfortunately that feature wasn't automatically installed, and I had to actually insert my Office 2003 CD. Let's hope that's not how it works for everyone.
Also, I want people to just have to click once, not twice. Here's that macro:
Sub AutoNew()
Options.ButtonFieldClicks = 1
End Sub
I think I can use AutoOpen or Autoexec too.
Finally, I want the macro to actually appear as a button, because people automatically know to click buttons.
I would also like Macrobuttons to display after one click.
3. Change AutoNew to Section1. Because I'm planning to have about 8 help links in my document, I need to have 8 different names for each macro. So you might have Section1 and Section2, etc., as your macro names.
About Tom Johnson
I'm an API technical writer based in the Seattle area. On this blog, I write about topics related to technical writing and communication — such as software documentation, API documentation, AI, information architecture, content strategy, writing processes, plain language, tech comm careers, and more. Check out my API documentation course if you're looking for more info about documenting APIs. Or see my posts on AI and AI course section for more on the latest in AI and tech comm.
If you're a technical writer and want to keep on top of the latest trends in the tech comm, be sure to subscribe to email updates below. You can also learn more about me or contact me. Finally, note that the opinions I express on my blog are my own points of view, not that of my employer.