APA style multi-line table and figure numbering with Word Captions

This question was sent to me, and I thought the solution deserves a blog post, since if one person is struggling with this, there are bound to be more.

The APA seventh edition requires table and figure captions to look like this (amongst others):

number: The table number (e.g., Table 1) appears above the table [or below the figure] title and body in bold font. Number tables/figures in the order in which they are mentioned in your paper.

title: The table/figure title appears one double-spaced line below the table/figure number. Give each table/figure a brief but descriptive title, and capitalize the table/figure title in italic title case.

There is no need to get into a debate about whether this change from previous editions is warranted, etc. It is the current guideline, and most students (I think rightly, on this point), couldn’t care less about whether this looks better than what was recommended in previous editions—they just want to get it done.

So here’s how.

The problem

The problem, of course, is that Word uses the Caption style for table and figure (and other) captions. And the Caption style is a paragraph style. But now we need a multi-paragraph caption. And if we format all those paragraphs with the caption style, they will appear as multiple paragraphs in the List of Tables/Figures.

The solution

Note. The images below show non-printing characters. I do explain in detail in my book why you should be working with these on, and this post is a good example.

As with so many things in Word, the solution lies simply in recognizing that we don’t actually need a multi-paragraph caption, we just need our results to look like a multi-paragraph caption. And in Word, you can sometimes create exactly the look you want using some surprising tools. For example, in my book I recommend using (borderless, and thus invisible) tables to align complex components (e.g., multi-part figures) on a page (although this should be done sparingly). This is another example of using a tool (a tab, in this case) to create an effect that looks as if it was produced by another tool (a line/paragraph break).

We want the whole single caption paragraph to contain, on its first line, the number, and then on subsequent lines, the title. Also, the font (bold, not italic) of the number portion (the word “Table/Figure” followed by a space and an Arabic numeral) is different to that of the title (not bold, italic).

The trick is to realise that in a normal caption paragraph, the number is separated from the title by a tab. Normally, this tab is just a little wider that the full number portion (e.g., “Title 123”), so that it creates a uniform placement on the page for the start of the title portion (i.e., whether the number is 1, 12, or 123, the exact point from the left margin where the title portion starts remains constant). All we have to do is set the width of that tab to the inter-margin width of the page, and it forces the title portion onto the next line, making it look as if it is in a new paragraph. Then we use a character font to change the formatting of the number portion (a bit of a nuisance, that!), and we are done.

The steps

In your document or template file, add a caption. Note in Figure 1 that the paragraph is formatted with the Caption style and that the ruler shows that the width between the margins is 16.5cm. what is harder to see is that the tab ends at 2.54cm. The reason for this is Word’s default half-inch tab stop width which is converted to 1.27cm. Since the word “Table” with its following space extends past 1.27cm, the tab stop takes it to the next increment—one full inch, or 2.54cm. I have opened the tabs dialog to make this obvious.

Figure 1   Table caption

First we want to set the Caption style itself. The simplest at this point is probably to open the Styles pane (Ctrl+Alt+Shift+S), since we will want to use it again below. In the Styles pane, right click on the Caption style, and select Modify… (Figure 2).

Figure 2   Styles pane—Modify caption style

In the Modify Style dialog (Figure 3), set the font to italic and the paragraph spacing to double line spacing. If you are working in a document that is based on your template file, then remember to select the New documents based on this template option to carry the change through to your template, making this a permanent fix for all future documents based on this template.

Figure 3   Modify Styles dialog—Caption style

Next, in the same dialog, select Format, Tabs… (Figure 4).

Figure 4   Format Tabs

In the Tabs dialog (Figure 5), set a 16.5cm left tab stop (you may need to adjust this based on your actual page width and margin sizes).

Figure 5   Tabs dialog

OK all the dialogs, and you will get the result shown in Figure 6.

Figure 6   Caption paragraph, double-spaced (incorrect)

There is one problem evident in this, and that is that the tab is actually now introducing an extra (double-spaced) line. Anyone with experience of Word’s tabs will know that this is easily fixed by typing a single space after the tab (highlighted in Figure 7—it is visible because I have non-printing characters displayed).

Figure 7   Caption paragraph, double-spaced

Next, to create the character style, select the “Table 1” text and the tab after it in your document, and, in the Styles pane, select New Style (Figure 8).

Figure 8   New Style

In the Create New Style for Formatting dialog (Figure 9—the same dialog as in Figure 3, just with a new title), I chose to add the name Caption Number so that this new style will be closely associated with the Caption style in the Styles pane, set the Style type as a Character style, and then set the font as bold and italic. Why italic? Well, in one of Word’s little idiosyncrasies, the character style is applied on top of the existing paragraph style, almost as if the attribute is set (or clicked, if you want) each time. Since bold and italic are toggles, the paragraph style “sets” italic formatting on, and the character style then “sets” italic style off.

Figure 9   Create New Style from Formatting dialog

This produces our end result, which agrees with what the APA style definition requires (Figure 10).

Figure 10 Properly formatted Table caption

And lastly, since the List of Tables (created with the Insert Table of Figures tool) uses the Table of Figures style, which has its own tab widths, the wide (16.5cm) tab stop created above is negated in favour of a more reasonable tab width in the List of Tables (Figure 11).

Figure 11   List of Tables

And that is how it is done. It may seem complicated, but it really is actually a simple and efficient workaround. Once this has been done, you can add your table and figure captions as before, and all you have to do is the (somewhat annoying) extra step of applying the character font over the number to get it looking as it should.


Getting back the old Word Spell Checker

If it ain’t broke, don’t fix it. This, I suppose, is easier to say than to do. Still, it is something that I have, on more than one occasion, wished that Microsoft would take to heart. Items from recent memory include replacing the ultra-efficient Print dialog and Print Preview with the ultra-inefficient Print-Preview-and-Print in Word 2010, which is jack of all trades and decidedly master of none. Or removing the Autocorrect option from the spelling error context menu in Word 2013. Or removing the red/green/blue wavy underline colour scheme for spelling/grammar/contextual errors (admittedly, problematic for the colour-blind) and replacing it with red for spelling and blue for grammar and context combined (which I am still not certain works for all types of colour blindness, although that is not my area of expertise). Or the way they keep messing with the most-recently-used (MRU) file list—each version since Word 2007 has seen this change, and from my perspective, the iteration that was most useful to me was Word 2010, now two versions back already.

The problem

Another of these “improvements-as-regressions,” which I am writing about here, is replacing the Spelling and Grammar dialog with the Spelling pane (also in Word 2013, and persisting in Word 2016). Microsoft has had a long history with panes, a history that, to me, seems to have been very conflicted. For example, moving the Mail Merge wizard to the Mail Merge pane, and then obviating the need for it with the ribbon (the pane can still be accessed, though). Personally, I find panes to be, err, a pain!

The Spelling pane is especially irritating.

Compare the pane to the old dialog:


Figure 1    Spelling and Grammar dialog vs Spelling pane

First let me say what is nice about the pane (to be fair). If you open the pane and leave it there (which I am very unlikely to do), then as you move around your document, when you place the I-beam on an error (misspelled word or grammatical/contextual error) then you immediately get the spell checking options for that error. And (in an American accent), the pronunciation of the suggested word you have selected if it was a spelling error (I do not know how this is going to help me make up my mind which is the correct word, but hey, it’s there!). And, in an insincere nod to the disabled, the Spelling pane options have accelerator keys highlighted (e.g., Change) which you cannot use (or at least, I have not figured out how to use them). Yes, I am being sarcastic. The “features” of the new Spelling pane are not really, in my mind, all that great. I could easily get by without them. Really.

What is so bad about the pane, you may ask? Well, it’s not what it’s got that’s bad, but rather what went missing from the dialog to the pane. As with the context menu, AutoCorrect is missing. As is Undo. Microsoft might argue that Undo was not used here a lot, but when I was zipping along through a long document, trying to whip the spelling into shape, then I found that I have often clicked the Change button a bit too hastily (perhaps it’s just me). Having Undo there was really a time saver. I could also immediately go to Options…, which, in all truth, I can still do in the usual way when using the pane. I could also focus only on spelling by turning the grammar checking off with the Check grammar box, which also helped me manage my workload. So yes, I miss those tools. Oh, and the keyboard accelerators actually work. How about that?

The solution

So what do we do when Microsoft throws us a curveball like this?

Do what I did with the Print dialog (you can read about it in my book or see the discussion I have in the Word uTIlities Help file)—take back what is (rightfully) ours!

The nice part about this is that you can decide how fully you want to revert—you can keep the Spelling pane and add the Spelling and Grammar dialog, or you can more fully replace the Spelling pane with the dialog.

The first part of this is to add a macro that will give us the old dialog. So, press Alt+F8. Then, in the Macro name box of the Macros dialog, type SpellingAndGrammarDialog and click on Create (Figure 2).


Figure 2    Creating the SpellingAndGrammarDialog macro

This will open the VBA Editor, with the Sub and End Sub statements for the macro already created. All you need to add is one line of code:

Sub SpellingAndGrammarDialog ()
End Sub

Press Alt+Q to get back to Word and just remember to save the Normal Template.

To add this newly created tool over and above the Spelling pane, just add it to the QAT. To replace the Spelling pane, assign the F7 key to the macro, instead of ToolsProofing. If you really can’t live without the Spelling pane now and then, you can still access it from the Review ribbon tab (modifying the ribbon to point to the macro is beyond where I want to go with this post). Now, to get back to real efficient spell checking, just press F7!


Announcing Word uTIlities 2.0

Well, it’s been two years since the last version of the Word uTIlities was released. Note: that means no new versions released to the adoring public constituency (all ten of you J) but not, by any means, no programming being done on my side: Considering the amount of code, I have almost doubled the work done for the first versions. But now the Word uTIlities are being released in an update that represents such a reworking of much of the core of the tools that I have decided it is time to increment the main version. So welcome to Word uTIlities 2.0!

What’s new in the Word uTIlities?

Word 2016 compatible

First up, all the tools have been tested and work with Word 2016, 32-bit and 64-bit.

New dialogs

Thanks to code posted by Dean Kinnear, I was able to capitalise on changes to Word 2013 to give users of Word 2013 and 2016 better message boxes. So if you are using Word 2013/2016, some of your dialog boxes will look like this:


Instead of like this:


They might even look like that in Word 2007 and Word 2010, depending on some system settings, as I have tried to keep things consistent across versions.

New reports

The reporting tools have been totally redone. Three reports are generated at present: The style summary, the list of bookmarks, and the list of index entries. In fact, the three separate reporting tools have now been replaced with one central tool that generates consistent reports for all three functions (and will allow me to easily add to the list of reports in the future). Now users are presented with a choice of whether they want the report in Excel or Word. The information-gathering process for the reports has also been streamlined for faster reports, although the report generation is a bit slower initially because the program first checks to see if it can connect to Excel. Once it knows what to do, though, the final report is also generated quicker than in previous versions.

Improved Backup

Even though it was working well, I have totally rebuilt the Backup tool. It is not only faster, but also now no longer needs to close and reopen the document when the backup is being made. The tool also now searches for existing backups and can then automatically determine how to name successive backups. What this means is that when you do your first backup on any given day, the process will be just as normal. If you make the second backup, it will, as in previous versions, ask you whether you want to make an alphabetic-suffix or time-stamp suffix second backup. However, what is new is that from there, it will find those backups, and will then automatically continue with your choice. So if you make a third backup on the same day, then it will automatically use the next in the sequence of the same suffix (alphabetic or time stamp). Therefore, making multiple backups on the same day will be much simpler. It also does a lot of other background stuff, like checking the amount of disk space for the backup file, etc.

I still have more plans for this tool, but that will come in a later update.

Document Statistics

Okay, I really didn’t do much here (i.e., nothing, really). This is a Microsoft Word tool (not mine at all), but it is useful in certain contexts, and it is so deeply hidden that I thought it deserves a little more attention. So all this tool does is open the Word Document Statistics summary.

Style Summary

Thanks to a very insightful collaboration with Howard Silcock in 2014 (Thanks, Howard!), I was able to squeeze a bit more out of this tool in terms of overall speed and functionality. Not much, but generating a style summary is such a laborious process that I felt every bit helps. I also have things that I want to try with this, as I really believe that it can be improved a lot, but I will need to do a lot of learning before I get there.

Numbered equation

Changes Microsoft made to Word 2013 document formats meant that this tool was not well behaved with Word 2013 any more, nor with Word 2016. But that has been fixed. I have had to sacrifice the centred equation (which you still get in Word 2010 and Word 2007), but there really is not much that I can do about it without Microsoft making an about turn on the changes they have made to the document format, which I consider unlikely.

Change Revision authors

Some tweaks to work around idiosyncrasies in Word document structure that caused an error.

Change Comment authors

In a moment of weakness, I forgot that when an input box gets cancelled, it takes a blank string as its argument, which meant that when you open the Change comment authors tool, and cancel it, all your comment authors get removed regardless. This is probably not what should be happening, so I changed the functioning of the tool so that cancelling the dialog, or emptying the input box and clicking on OK, will result in nothing being done. To change the comment authors, enter the new name and click on OK (as in previous versions). To remove the authors completely, enter DELETE in the input box (which is also now the default when the tool is launched).

Fit Hyperlink

Some minor tweaks to improve how it works when used inside a table. Still not perfect, but I’m getting closer….

And what’s in store

I am working on two new tools which I think are really great. These will be released as versions 2.1 (and possibly 2.2). I will give you a hint as to what’s in store. Think revisions and think dates…. Once again, the impossible will be made possible right here.

I also have a number of other things that I would like to include, but it takes time…. I will, of course, post about them here when I eventually get them done.

So, without further ado, go take a look!


Conditionally stopping code

One of the VBA programmer’s tool of debugging tricks is using the Stop statement in code to stop code execution at a certain point where they want to examine what is happening.

Of course, this is similar to setting a breakpoint (F9), but it is more permanent (especially useful if you are not finished today, and want to shut down so that you can continue again on a later date).

However, generally you will find that programming “tutorials” will discourage you from using this, and with good reason. The biggest problem is scattering your code with Stop statements that don’t come out in your debugging, but do interrupt your code when your users are running it.

Now I am not going to suddenly start recommending that you start prolifically using Stop statements, but I have found that in certain instances, I really do find it useful. But at the same time, I am really fearful of leaving a Stop statement into my code, and not deleting it before I release the AddIn to the public.

So today, I thought of a simple solution for myself that will not work in all contexts, but may help someone out there too. The reason that it works for me is that I generally have two versions of my AddIns. One is named xxx unprotected.xxxm (e.g., Word uTIlities unprotected.dotm). When I feel that the AddIn is ready to release to the public (it’s been more than a year since I last released an update to the Word uTIlities, but I have some big improvements coming), I make a copy without the unprotected suffix (e.g., Word uTIlities.dotm). Then I add a password to that, package it in an install file, and it’s good to go. That fact—that the version I am working on, and debugging, does not have a password, while the one my users are running does, provides me with a clue to setting up my Stop statements in my code that will work for me, but not interrupt my users.

So all I started doing was changing the Stop statements in my code as follows:

For Word:

If Not ThisDocument.HasPassword Then Stop

For Excel:

If Not ThisWorkbook.HasPassword Then Stop

This, at least, means that so long as the document has a password, the Stop statement will not interrupt the code. Yes, I will still do my best to delete my Stop statements when I am done with them, and if I should not delete those statements and I forget to give my AddIn a password, then it will still bomb out.

What if you don’t have a password? Well, you could create a global variable, but then you would have to remember to “deactivate” that variable before distributing.

So, for example, you would include this dim statement:

Dim bAllowStopping as Boolean

Then the code would just be:

If bAllowStopping then Stop

You can only activate stopping by setting:

bAllowStopping = True

But if you ship the AddIn with that line of code still there, then it will stop, and remember that, because the variable is global, it will stop anywhere the Stop statement is found.

Note that I chose something like bAllowStopping, which, when declared, has the value of False; and not something like bOverrideStopping, which would logically, want to be set to True to not stop—I would want to have to explicitly set it to True before it starts stopping my code. So, as long as I don’t actively set it to True, it won’t stop my code.

One last option, of course, is to tie the Stop statement to the username, e.g.:

If LCase(Application.UserName) = "joe bloggs" Then Stop

However, I consider this to be quite risky, as firstly, I don’t like shipping my application username with my code, necessarily, and secondly, I might, for who knows what reason, might choose to change my username, and thirdly, the odds of there being another user out there with the same username as my own (either through coincidence or being purposefully set) are not that remote.

For my part, I will stick to my first option of checking for the password, and still try to use Stop statements as little as possible, and also follow that up with deleting them when I am done with them.


Why I would not do my thesis with Word 2013 (and why I might)

I have been working with Word 2013 since the public beta was made available in October 2012—more than two years now.

While I have always had my pet peeves about the Office products, I have, in many ways, also been a bit of a fan boy for products like Word and Excel. Even with Word 2007, which many people deplored, and about which I had my own complaints, I was still quite able to see improvements which made the upgrade worthwhile. However, even after two years of use, I find myself particularly unimpressed with Word 2013. In fact, most of Office 2013 has left me rather unimpressed, if not downright disappointed. A prime example is the dumbed-down Presenter view in PowerPoint 2013—which Microsoft touted as a big improvement, but which is, in comparison to what PowerPoint 2010 offers, so pathetic that I refuse to do live presentation with PowerPoint 2013 if I can help it. Excel 2013 is the only program where, along with the regressions (like the dumbed-down sheet tab controls that I detest, and the dumbed-down charting tools that I find actually hinder the quick creation of charts), there are also noticeable improvements that matter to me. I suppose that’s an important point to make, because, of course, Microsoft has made many “improvements” to all their products in the 2013 iteration, it’s just that most of them are the kind that I could happily live without, and the things that are important to me, I find frustration.

In fact, if I stop to think about what it is I find so distasteful about Office 2013, it is that I feel it is a definite dumbing-down of the product. Some things are superficial and cosmetic (even after two years, I prefer the Office 2010 ribbon—which is, itself, a toned-down version of the too-loud Office 2007 ribbon—to the bland, dead Office 2013 ribbon). Or the new UI messages which are just too informal, even for me (actually, it’s not the informal that bothers me, but that fact that they have, at the same time, become uninformative). Other things are more serious, like the removal of tools that I actually use (see autocorrect below).


But before I make this one long gripefest, let me highlight some of the positives in Word 2013. You can see this article to see what’s new in Word 2013, most of my comments here relate to the new features.

Microsoft has made some significant changes to reviewing. While you will see below that some of them are negative, one positive is that reviewers can now comment on each other’s comments. The process is quite smooth, and, if a student and multiple promoters are all into electronic reviewing, a real time saver. Promoters can see what other promoters have said, and can weigh in themselves. Of course, we will all debate like adults, won’t we! J

Word 2013 now also offers the option to embed videos into a Word document. While PowerPoint has been able to do that for a very long time, it has always seemed a bit pointless in Word, but that has changed with the rise of eBooks and the rising popularity of multimedia content in eBooks. So while you still can’t print out a video on paper, put it into an eBook, and it could work. So there, Word is keeping with the times, and this an important addition.

Furthermore, Word 2013 now also has the image guides which were added in PowerPoint 2010, but not the rest of the 2010 Office suite. This also makes working with images much easier, and is a welcome addition, although it should have been available in Word 2010 already—I sometimes get the impression that the Office team doesn’t get time to complete all the planned work before the scheduled release date, and so we have one feature being progressively made available throughout the suite across several releases.

The integration of OneDrive giving you cloud storage of your documents is also a boon, but I must add that one does need to use the cloud “carefully.” If your account gets hacked, and your files get deleted, and those are the only copies around, you might be in for some trouble.

The layout of the Office 2013 applications are supposedly to also make them easier to use on small devices like tablets, but I find that a bit of a non-argument, as I really can’t see why I would want to do my thesis on a small device like that in the first place. Maybe for some extra work at the airport or on the road, yes, but for the data-to-day work needed to complete something big like that? No way!


The Resume reading feature is a waste, since Shift+F5 has worked in every version of Word except Word 2007, and in any case the little message often disappears before you can click on it—what good is it then?

While I like the ability to comment on comments, the change to “simple “reviewing is a downright pain. Again, Microsoft dumbs things down, which may make them more unobtrusive, but also make them less efficient.

Microsoft removed AutoCorrect. I’m not alone in missing it. They say people never used it, which just means that they never survey people like me, who do use it. Fortunately, Greg Maxey shows how to fix this.

Microsoft also made important changes to the way their citation tools work which render even advice Microsoft posted about how to customise the tools invalid. I discuss some of these changes here. What really irks me is that they did not announce these changes in any way that I could find—they just made them. That is not the way to win or keep the confidence of your users.

Did I mention how much I detest the flat, uninspiring interface of Office 2013?

One of the things I really hate is the vanishing scroll bars. Type in Word, and the scroll bars disappear. Move the mouse and they momentarily reappear. I suspect this also has to do with getting Word ready for smaller screens, but for goodness sake, I have a big screen, and I am proficient enough to type for an extended period of time without have to resort to the mouse. I have grown accustomed to glancing at the scroll bar, as it provides important visual feedback as to where I am in a document (I read a lot of other people’s documents, so I need this information very frequently), and I still get irritated when I look in its direction to get that information, and it’s not there!

I have also found Word 2013 to be significantly slower than Word 2010. This is in all areas, from running macros (I have documented tests for running the same macro in both versions, showing Word 2013 to be up to 40% slower), to loading documents, saving documents, and even just the time it takes to open. I have Word 2010 and 2013 installed on my current system, so it has nothing to do with the system. The degraded performance is noticeable.

With Office 2013, Microsoft have gone all out for online help. That already irritates me, because getting online help is necessarily slower than getting installed help. When you click on Help in Office 2013, you don’t get a help browser that open—no, you get your web browser opening to go to Microsoft’s site. That takes a few seconds at best, and each time a web page loads, more time is lost. Thankfully, you can still set the Application help to Offline help, but the help from the VB Editor goes straight to the browser. And that’s the help I use the most. But it’s not just that that frustrates me. Microsoft has changed the very nature of their help content. The impression that I get is that, I would assume to save costs, they seem to have fired all their help-writing staff, and now all you get in your web browser is a search of various Microsoft sites and the rest of the Internet on your help topic. If I had wanted to go to a search engine to see what the rest of the world has to say on a topic, I would have done that. When I click on help, I expect to find the documentation provided by the people who made the program on how their program works. It seems harder to get that now than ever before.

One last thing (I think). I simply deplore the new dumbed-down spell checking pane which has replaced the old spelling and grammar dialog. Not only is it not now possible to ignore grammar rules, you can now also not edit the misspelled item in the dialog (e.g., if none of the suggested items matches what you actually intended to type–yes, I do type that badly!), but have to jump to the text to change it, and then resume spell checking. These are small changes, but I find that spelling & grammar checking now take much longer than they used to (i.e., a decrease in productivity). Oh, and to make matters worse, despite the buttons in the pane being marked with accelerators, they do not respond to the keyboard, so you have to manage the process with the mouse now, which is even slower! And it’s not just in the pane that the dumbed-down spell checking annoys me. I have already mentioned the missing auto-correct, but the long history of red, and green underlining for spelling and grammar errors, respectively, with blue added for contextual errors since Word 2007, has been changed. Now, in Word 2013, we have red for spelling errors, and blue for grammar and contextual errors. I realise that the choice of red, blue, and green may have been unfortunate for those who are colour blind, but why not include options in the interface to change those colours? Now, however, Word 2013 is giving me less information than Word 2007 and Word 2010 in terms of inline spell checking. And I find that annoying.


In short, if you asked me for advice, then unless you were a hardcore going-paperless-all-the-way student (who has promoters who can actually play along) or a cutting-edge creative arts student, where your thesis will incorporate video, I would tell you to stick with Word 2010 for your thesis.

I am still rooting for Microsoft, and I am hoping that Office 2016 will be to Office 2013 what Office 2010 was to Office 2007—the way it was meant to be.


Table styles and multiple-row table headers

This post might present you with something small, to which you say: “I can’t believe he didn’t know that,” or it may just show you something so deceptively simple that you end up saying “I can’t believe I’ve missed that all these years—it’s so obvious, but simultaneously so counter-intuitive.” So this post won’t be “up there” on the Wow-factor scale, but it may just simplify one little aspect of working with tables for you, I hope.

As readers of my book will know, I am a (cautious) fan of Word’s table styles. Cautious, because while they can drastically ease and speed up the process of creating multiple uniformly formatted tables, they take some getting used to, and you can just as easily do something wrong and “blow up” your tables if you don’t know what you’re doing.

One of the nice things about table styles is that you can set formatting for the table as a whole, and then for each specific constituent part of the table (Figure 1). You can specify individual (and thus differing) formatting for:

  • Whole table
  • Header row
  • Total row
  • First column
  • Last column
  • Odd banded rows
  • Even banded rows
  • Odd banded columns
  • Even banded columns
  • Top left cell
  • Top right cell
  • Bottom left cell
  • Bottom right cell

Figure 1    Choosing which portion of the table formatting is specified for

This feature makes table styles very flexible: Note the group of Table Style Options on the far left of the Table Tools: Design ribbon (Figure 2). These setting, as it were, turn the differentiations you specified in the process of defining the various elements of your table style, on and off. Thus, if you specified a bold header row, then the text in the header row will only be bold if the Header Row check box in this group is selected. If not, then the text in the header row will appear as defined for the whole table.

Figure 2    Table style options

Probably the most-used of these various constituent parts is the Header Row (and probably then First Column after that). It stands to reason that the Header row formatting applies to the first (i.e., top) row of the table. However, here we have a dilemma. What if you have specified a certain header row formatting, but some of your tables have headers that span two (or three) rows?

Once you see it, it is obvious, but it’s one of those things that is so obvious that we (myself included) often overlook them. You should know that the Repeat Header Rows function (Figure 3) can be used for multiple rows. This setting is used if you have long tables that span more than a single page, as it allows the header row(s) of the table to be repeated on each successive page.

Figure 3    Repeat Header Rows

The interesting thing (and this is not necessarily intuitive, and has not, to my knowledge, been documented by Microsoft), is that turning this setting on with multiple rows selected, even when your table does not span multiple pages, will instruct Word to treat all selected rows as header rows, and Word will then apply the header row formatting to all of those rows. Et violà!


Yes, there’s a catch. This works fine for settings like font settings, shading, even repeating header rows. But it doesn’t work for borders. So if you want, for example, only a bottom border and have that set on your header row formatting, then when you do this with multiple rows, each row will have the bottom border, not only the lowest one as you might have hoped. That will require a manual fix, unfortunately.


Learning Keyboard Shortcuts

This week (Week 26 of 2014, for the Excel aficionados), we have had a very interesting discussion on the Word-PC e-mail list about keyboard shortcuts. This led to me sending a mail to the list about how to teach oneself keyboard shortcuts (or, more precisely, the system I use to teach myself—and I am still continuously learning—keyboard shortcuts). Since I realise that it might prove useful to others, I have modified that mail slightly for this blog post. If you find what I write below useful, this topic is discussed in greater detail in my book on Word, together with many others topics that you might benefit from.

First up, how not to learn keyboard shortcuts: Don’t search for a list and try to commit it to memory. This fails, because firstly we are overloading our brains with too much information in too short a space of time (any student can verify this three weeks after an exam). Secondly, we are dealing with the list as an abstract thing, and not relating it to our use.

My own experience has been that a very simple discipline (which I will get to shortly) has worked very well for learning keyboard shortcuts.

Before that, though, it is useful to examine how we discover keyboard shortcuts. Yes, lists are useful for that—every time I see an article on keyboard shortcuts, I make certain that I read it (I just picked up a new Excel keyboard shortcut this week in that manner). Second, we all (or at least those who type as inaccurately as I do) have had the experience of pressing something on the keyboard, and seeing something go haywire (e.g. we wanted Shift+R for an uppercase R, but hit Ctrl+R and right-aligned our paragraph). Normally we just undo (Ctrl+Z), but I normally take some time out, try to see if I can figure out what I just hit (I will sometimes undo and try to recreate the keyboard shortcut with what I thought I was typing). I will also evaluate whether this keyboard shortcut is useful for me—if not (e.g., the keyboard shortcuts in Word for Danish characters are some that, no offense to the Danes, I hope I never have to use), then I just forget about it and carry on with my life. If it does appear to be useful, then I will set about learning it. Also, it pays to be observant. It amazes me that people look at menus, and never see (i.e., observe) the keyboard shortcuts listed in those menus (of course, since Office 2007, the Office keyboard shortcuts are displayed in better-hidden tooltips—yet another way Microsoft seems intent on de-cluttering by dumbing down).

One other note before I get to the learning bit. Some keyboard shortcuts are system-wide—meaning they will either work on the OS level, or will work for almost all programs known to man (if you will excuse the exaggeration). Examples are Ctrl+C for Copy, Ctrl+P for Print, Ctrl+S for Save, etc.). Some are, for want of a better term, platform-wide (e.g., Ctrl+H for Replace in all of the Microsoft Office programs, while Ctrl+R does the same in many other programs). And some are program-specific (e.g., Ctrl+Alt+M for a comment in Word, which is Shift+F2 in Excel). If I am working in a new program, I will (after having duly saved my work), freely experiment in that program with keyboard shortcuts that I believe would work there (i.e., those keyboard shortcuts that are in the first two categories I mentioned). I’ve never had a computer meltdown as a result of this (yet!), and it gives me, so to speak, more bang for my buck for the effort of learning keyboard shortcuts.

So, how do we learn keyboard shortcuts?

Still not there yet…. Some keyboard shortcuts are mnemonic (Ctrl+B for Bold, Ctrl+I for italics, Ctrl+C for Copy—and, on that point, notice the position of the X,C,V keys on a qwerty keyboard, and remember Cut, Copy, Paste—and, in Word, Ctrl+L for Left alignment, Ctrl+R for Right alignment, and Ctrl+J for Justified alignment, etc.). Unfortunately, not all keyboard shortcuts can be mnemonic (e.g., Ctrl+C is already taken, so Centre alignment in Word becomes Ctrl+E). Obviously, mnemonic keyboard shortcuts are going to be easier to remember, but we need to go further.

So, how do we learn keyboard shortcuts?

Firstly, one or two at a time. This overcomes the first mistake I noted at the start. Sometimes I will do a handful at a time (e.g., when I discovered various commonly used number formats in Excel with Ctrl+Shift+1 (Ctrl+!), Ctrl+Shift+2 (Ctrl+@), Ctrl+Shift+3 (Ctrl+#), Ctrl+Shift+4 (Ctrl+$), Ctrl+Shift+5 (Ctrl+%), Ctrl+Shift+6 (Ctrl+^)—although I never use the last one in my line of work). But when I do teach myself a whole bunch of keyboard shortcuts, there will be some relation between them, as in the list I just showed here.

Secondly, we want to relate it to usage (thus overcoming the second mistake mentioned above). Allow me to explain, because here I am finally coming to that little discipline that I hinted at. For example, this week I learned that Ctrl+6 hides all objects in an Excel worksheet. If I didn’t get that from a list (I did, in this instance: http://www.databison.com/so-how-many-of-these-excel-shortcuts-do-you-know-punk) then I will make a note of it. Now I don’t work with objects in most of my sheets, so it may be two or three weeks before I get an opportunity to use that one. By then, I will have forgotten it. So three weeks from now, most people think to themselves:
“What was that keyboard shortcut for hiding objects again? Arrghh. Can’t remember it. Ah well, that just proves that this keyboard shortcut stuff is a load of junk. I’ll take my mouse, click Home | Find and Select | Selection Pane, and then click on Hide All.”

What I do, in contrast, is use this little discipline: I stop, go back to my list or note, look the keyboard shortcut up, and then use it. This process of using it activates a second memory channel (muscle engrams—go look it up), over and above the cognitive memory process. We all use this, we just don’t think about it. For example, I’m standing in front of the ATM to draw cash, and it’s one of those days where, for the life of me, I can’t remember my PIN number. So what do I do? Hopefully, not pull out the little slip of paper—that everyone can see!—where I scribbled it down. I know people who have had their accounts emptied in this way! No, I make as if I’m going to type the PIN, and suddenly it comes back to me. I am using my muscle engrams (the same things tennis or cricket or any other sport players use to perform those shots so masterfully) to bring back the memory of what my PIN is. In other words, the part of my brain that moves my hand to type my PIN also remembers that action—it is a second memory channel. So when I use that with keyboard shortcuts, I am actually memorising the keyboard shortcut in two different ways (cognitively and “physically”). In fact, even now, I sometimes struggle to recall what a certain keyboard shortcut is, but if I get behind the keyboard and make as if I’m going to do it, I can figure it out again.

Now sure, that process of stopping, looking up the keyboard shortcut, and using it, does take longer than just doing it with the mouse. But it is a short term loss for a long term gain. Once that keyboard shortcut is mastered, I will save a few seconds every time I use it, regaining and overtaking what I have lost in looking it up once or twice.

And one last thing. I know keyboard shortcuts are not for everyone. I must also confess that I am not musophbic (go look it up, although I am twisting the word beyond its original intention), and the mouse has its place—some things really cannot be done without the mouse (some programs, for example, are really not keyboard shortcut friendly) and some things (not many, but they are there) can be done faster with the mouse than the keyboard. Some things, of course, can only be done with the keyboard and mouse in conjunction (macros aside): Did you know that you can select one sentence in Word by holding the Ctrl key while clicking anywhere in that sentence? (This does sometimes trip over abbreviations, though.)

But keyboard shortcuts definitely do help you work faster, and keyboard shortcuts can help out in the most unlikely situations—those that you have never thought of (have you ever tried working with the touchpad of your laptop while seated in a plane going through some turbulence?). So much so that, in addition to keyboard shortcuts, I have memorised quite a few ribbon manipulations on the keyboard (for one example, Alt | JL | F | C to AutoFit a table in Word—I defy you to do it quicker with the mouse than I do with the keyboard. Sure, I could create a keyboard shortcut for that and do it seven split seconds faster, but typing that string is so quick, I hardly see the need.

The question then becomes twofold: So how many keyboard shortcuts do you know, punk? And, more importantly, how many keyboard shortcuts will you know a year from now?


Harvard SA update for Word 2013

As you can imagine, it’s been a while since I’ve used the Word referencing system (having switched totally to Mendeley, as my book on the topic attests).

So it was a bit of a surprise when a student came to me and said that my Harvard SA style for Word is not working in Word 2013. It took a bit of head scratching, and then some internet searching, to get a solution. As usual, it was Yves Dhondt of BibWord who had already come to the rescue.


I have made the change he recommends, and it now works in Word 2013.

It still took a little more trying, after making his recommended modification, to find that I needed now to add the HarvardSA.XSL file to


and not (on my system):

c:\Program Files (x86)\Microsoft Office\Office 2013\Office15\Bibliography\Style\

In short, I recommend doing a complete file search for Chicago.xsl, and copying your extra style files to each place where you find that file from Microsoft.

The updated file can be downloaded from my example files page:
http://insight.trueinsight.za.com/word/dissertation/examples (or directly from here). Unzip it, and copy it to the aforementioned folders.

The new file works on Word 2007, Word 2010, and Word 2013 (tested on my system), so there’s no need for separate versions.

I must say that I am a bit disappointed (understatement!) in all this. Think about it. Microsoft creates a new tool (in Word 2007). They even encourage us to customise it for our own use:



Then they go and change the way the tool works, so that the customisations they encouraged us to make are rendered inactive. But they don’t post any notice about these changes, not in their online documentation (such as this page or this page or this page), not in their blogs, nowhere. This is not the kind of thing I expect form a company that charges you serious money for their product (I confess that I still feel it’s worth the money, but then they need to give the support the product’s price demands).

Ah well, ranting like that doesn’t help. But at least you can still do your thesis referencing, even if you are using Word 2013! Thanks Yves, you’re a hero!


Using the Date picker

I was working on a new tool for the Word uTIlities, when I discovered that there really doesn’t seem to be particularly much available by the way of good information on how to use the date picker control. Not even the two “standard” works I have on my bookshelf (John Walkenbach’s Excel 2010 Power Programming with VBA and Bovey, Wallentin, Bullen and Green’s Professional Excel Development) make much mention of it.

So, while this is not intended to become the be-all and end-all of your search for information on the date picker, I do want to add here what I have learned so far.

Why use the date picker?

In all honesty, getting date and time information from users can be done with standard tools like text boxes or combo boxes. But the date picker offers a large number of advantages, and the main reason for using it is the huge convenience it offers. Firstly, it is more convenient for your users, as it offers them date/time specific ways of providing information (e.g., a “digital clock” for time, and a calendar for dates), while still allowing keyboard folks like me to type in the information they want to add. And convenience for users is not a frill, but a necessity.

Having said that, the date picker also offers huge advantages for the programmer. First and foremost is that it delimits the information users can add, so that you can by definition not get invalid dates or times from your users, obviating a large amount of code that would otherwise be required to test and validate what they have entered. Furthermore, it can be customised to let users enter only the information you want (more on that below). And finally, its values are already in the date format (which in VBA is date/time), so it both accepts and provides date/time information without the need for conversion.

Getting the date picker

Finding the date picker is not obvious. In the VBE form editor, right-click on the toolbox and choose Additional Controls… (Figure 1).

Figure 1    Additional controls for the Toolbox

Then, in the Additional Controls dialog, find the Microsoft Date and Time Picker Control and make sure that the box next to it is marked (just clicking on the control doesn’t mark the box, it just selects the control—you have to click the box itself), as shown in Figure 2.

Figure 2    Additional Controls dialog (Showing Microsoft Date and Time Picker Control)

Click OK, and the control will appear on the Toolbox (Figure 3).

Figure 3    Date Picker added to Toolbox

Now you can click on the tool, and add date pickers to your user forms as you would any other control. Figure 4 shows a new tool I am working on for the Word uTIlities (this will be version 1.9), although I am not certain that all the options shown here will appear in the final version. This is suddenly quite a heavy usage of date pickers—eight at the moment (the three on the right might not make it, though…). Note the three different applications of the date pickers. Some are used to give dates, some for times, and one (bottom right) for only hours.

Figure 4    User form showing various date picker controls

Customising the date picker

I will limit this section to things specific to the date picker. Since it is a form control, it shares many of the normal form control formatting settings, which I will not discuss.

To set how the control works, it is best to work with the Properties pane. Figure 5 shows the Properties pane for a date picker control, with the relevant items highlighted.

Figure 5    Date picker properties

Note that I haven’t highlighted the Calendar color settings, but these are only for window dressing, and should be easy to figure out if you should choose to modify them.

Here’s a quick rundown of what you can do with these properties:

Use MaxDate and MinDate to set (respectively) the latest and earliest dates from which the users can choose (the default range of 1601 to 9999 might be a bit broad…).

The Value property allows you to choose what value the date picker displays when the form is loaded. See below for more details on changing this at run time.

The most important settings are the Format and CustomFormat settings.

For Format, Figure 6 shows that you have four choices: Long date (0); Short date (1); Time (2); and Custom (3).

Figure 6    Format property settings

Figure 7 shows what each of the first three look like (Short date on the left, Long date in the middle, and time on the right).

Figure 7    Date picker formats

Note that time defaults to a 12 hour clock with hours, minutes, and seconds.

So what if you don’t want one of those formats (for example, you would want date and time, or you don’t want seconds, or you want a 24 hour clock, etc.)? In these instances, choose the last format—Custom (3). Then, in the CustomFormat property, define the format you want. I am not going to go into an extended discussion of the formats now—if you are familiar with number formatting (e.g., in Excel, or in Word Merge fields), you will understand what is required. So, for example, to leave out the seconds, use hh:mm. To leave out the seconds, and switch to a 24 hour clock, use HH:mm.

But there are problems. Figure 8 shows a date picker set to the Time (2) format on the left, and one using the Custom (hh:mm) format on the right. The problem, as is patently obvious, is that when the custom format is set, the spin buttons are removed (they are quite important for a time picker) and the drop-down again gives the calendar (essentially rendering it useless for setting a time).

Figure 8    Standard time format vs. custom time format in date picker

So what to do? Well, if you’ve been observant, there’s one highlighted property in Figure 5 that I haven’t discussed—UpDown. That’s what turns on the spin button (and removes the calendar) for the time picker.

Furthermore, the Value, MinDate, and MaxDate properties remain set to dates, even though the custom format specifies only time, although that is not really a problem—just type a time in, and the VBE will accept it.

Also take note of the (Custom) “property”—note that it is in parentheses in the properties pane, indicating that this is not actually a property. Sure enough, click in the property value field, and the dialog launcher appears (Figure 9).

Figure 9    (Custom) date picker “property”

Click the dialog launcher, and the Property Pages dialog appears. I will not discuss the Font, Color, or Picture tabs. But let’s take note of some of the settings on the General tab. Many of these are in the Properties pane ad well, but you can set them here if you wish.

Figure 10    Property Pages dialog

How the date picker works for users

The beauty of the date picker tool is evident when the form is loaded and the user has to set a value. Clicking on the date picker reveals a calendar (Figure 11) that users can navigate (note the previous and next month selectors at the top) until they get to the right value. There, they can click on the date they want, and it is set as the value in the control. And, of course, the picker only presents users with valid dates to choose from. And if users type in invalid dates (e.g., 2014/02/29), the control won’t accept them.

Figure 11    Using the date picker

Times are also easy to set (Figure 12). The user clicks on the time part they want to set (e.g., in Figure 12, the minutes section is clicked). Then the user uses the spin button to move the value up or down. If it reaches the maximum allowed for that time unit (e.g., 59 for minutes or seconds), it just moves on to the minimum again, and vice versa. Users can also type in times if they want.

Figure 12    Using the time picker

Setting the date picker values

One of the nice things about the date picker is the ease with which you can set its values when you load your form (or at any other event, such as when another control on the form is set—the form in Figure 4 does exactly that). For example, for some unknown reason, the value property of the date picker is set to the date you add it to the form. But this means that, for example, a year hence, the date displayed initially by your form will be a year old, when you would probably want it to display the same date on which the user has launched the form.

So what do you do if you want to load specific values that will be determined at run time? The date picker makes this incredibly easy, since it accepts date values. So, for example, some of the underlying code for the form shown in Figure 4 is:

Dim DateTimeFirst As Date
DateTimeFirst = rev.Date
If Left(Me.CBxDateSelector1.Value, 6) = "Before" Then
Me.DTPicker1 = DateTimeLast
Me.TMPicker1 = DateTimeLast

Note that I set the date-formatted date picker and the time-formatted date picker to the same variable (the Date data type in VBA stores both date and time), but each date picker uses only the portion relevant to its formatting—the date for the former, the time for the latter. Of course, you could make doubly sure, or convert variables of other types (like string variables) to date or time values like this:

Me.DTPicker1 = DateValue(DateTimeFirst)
Me.TMPicker1 = TimeValue(DateTimeFirst)

Which of course also means that you could specify something like:

Me.DTPicker1 = DateValue("2014/04/01")
Me.TMPicker1 = TimeValue("14:05")

Although why you would want to hard-code values like that and not add them manually as defaults is beyond me.

One last thing: to set the date or time to the current (date or time), simply use

Me.DTPicker1 = Now ()
Me.TMPicker1 = Now ()

Getting date picker values

Opposite to the above, once the user has entered a value in the date picker, you would obviously want to get that value and use it in your programming (typically when the OK button has been clicked).

The code is essentially the reverse of what we have seen above. Note that since VBA only has the Date data type (and not a separate Time data type), you would declare your variable which is to hold the date picker’s user-set value as a Date Variable. Then simply set it to the date picker’s value:

Dim Date1 As Date
Dim Time1 As Date
Date1 = DTPicker1.Value
'Of course, the '.Value' is optional, since value is the default property.

Time1 = TMPicker1.Value
'Of course, the '.Value' is optional, since value is the default property.

Again, you can make more certain with

Date1 = DateValue(DTPicker1)
Time1 = TimeValue(TMPicker1)

But that does beg the philosophical question of how more certain you can be when you are already certain….

[And I think that’s my cue that this blog post has now gone on long enough!]


Separate table (or figure) numbering for appendices—Take II

This post will only make sense after you have read the first part. If you haven’t read it yet, go and read it first, and then follow the link at its end to return here.

If you’ve used my uTIlities, then you know that I do a little programming on the side. As such, although I am by no means an expert, or even a professional, programmer, I do have sympathy for the challenges that programmers face, like, for example, the team at Microsoft responsible for Word or Excel (despite my occasional griping about things I don’t like). One of the biggest challenges I find in programming is that I cannot anticipate all the contexts and ways in which some tools might be used. For example, how will the Fit Hyperlink tool work when the hyperlink is in a table? At first, I didn’t program for that eventuality, and, of course, the first time I tried it in that context, it didn’t work.

Of course, that doesn’t necessarily only happen when we do programming. About a year ago, I wrote a piece about how to get caption numbering set up in appendices. Of course, it worked, and the post has been reasonably popular, and, I am glad, seems to have been helpful to quite a few people. And then someone contacts me and lets me know that my solution is not working. Why not? They have tables and figures in their appendices, and I only set it up for tables. My solution would work for tables, or figures, or any other caption, but only when only one of those is present in the appendix. When tables and figures appear in the appendices, then the List of Tables and List of Figures (actually, in terms of Word, the TOC for tables and TOC for figures) contains all the tables as well as all the figures.

So how to fix this?

Well, the approach I suggested previously for the numbering is sound (the problem is with the TOCs), so for the tables, use SEQ fields with the customised identifier AppendixTable and use the customised identifier AppendixFigure for the figures. But for the List of Tables (and the List of Figures), we now need to split up the process. First, add this field: { TOC \H \C “Table” }. Then, right next to it, this one: { TOC \H \C “AppendixTable” }. What we are doing, is essentially creating two TOCs for the List of Tables: The first one finds all the tables in the main document (i.e., our chapters), then the second one finds all the tables (marked with the SEQ identifier AppendixTable) in the Appendices.

There is one trade-off. When the fields are built, an extra paragraph is inserted. It doesn’t actually look that bad, though, and the break between the main tables and the appendix tables seems natural.

There are some alternatives to this, if you really don’t want the break. Firstly, you could manually mark all the tables (and figures) with TC fields (I explain how to do this in my book). This will allow you to build a single TOC for the tables and a single TOC for the figures. But this is a lot of manual work, and I want an approach that is relatively automatic.

If you want to see this in action, this sample document shows the effect.