Word X: Can’t repeat
Posted by Pierre Igot in: MacintoshApril 3rd, 2003 • 7:28 pm
Another major annoyance in Word. I have several very simple macros that automate very common tasks, such as adding 12 points of “space after” to a paragraph of text (instead of typing a double paragraph mark, which is a big no-no):
Sub setSpaceAfterTo12() setSpaceAfterTo (12) End Sub --- Sub setSpaceAfterTo(mySpace) With Selection.ParagraphFormat .SpaceAfter = mySpace End With StatusBar = "Space After: " & mySpace & " pt." End Sub
Instead of HAVING to: 1) go to the “Paragraph…” dialog box; 2) go to the “Indents and Spacing” tab; 3) go to the “Spacing After” field; 4) enter the “12 pt” value; 5) exit the dialog box — I can just trigger the above macro with a toolbar button.
Since Word X systematically conspires to make life more difficult for me, however, it systematically refuses to recognize the macro as a proper Word command and to include it in the sequence of commands that can be undone or redone at will. In other words, if I apply the 12 pts of “space after” using the painstakingly slow manual approach, then I can go to another paragraph and simple type cmd-Y (or go to the second command in the “Edit” menu) to repeat the same action on another paragraph, etc.
If I use my macro, however, then the menu command is greyed out and says “Can’t repeat VBA-ParagraphFormat.SpaceAfter” — or alternatively it offers to repeat the last command that I did right before I used my macro.
It’s the same with all kinds of user-defined macro commands. Grrr…