Ever wish you had a tiny creature inside your computer that did your bidding? Something to pick up slack on a particularly hard day? It happens that you do: your macros. You tell them what to do and when to do it, and they are forevermore at your beck and call.
Applies to |
---|
Get the Crabby Office Lady’s book
Read all the Crabby Office Lady columns
Get Crabby’s columns via RSS
View Crabby’s videos
Disclaimer
Frankly, I rarely start my columns with a disclaimer. I usually end up backpedaling in a future column over something I wrote in a previous one —but today I feel I must say this first. Some of my loyal readers are expert Office users, while others are beginners or somewhere in between the two. This column, about computer macros, is for the latter. You experts already know and have probably written hundreds — if not thousands — of macros. So you do not need to send me feedback that tells me I’m dumbing down to you. The purpose of this column is simply to provide information to anyone interested in how to make their work life more efficient through the use of macros. When your average computer user finds out that macros are all about little bits of code, the fear in their hearts becomes palpable, all the way from here. And so today I want to ease those fears and invite those of you who’ve been curious about macros to take the plunge and finally learn about them.
Ever wish you had a tiny creature inside your computer that did your bidding? Something to pick up slack on a particularly hard day? It happens that you do: your macros. You tell them what to do and when to do it, and they are forevermore at your beck and call.
Applies to |
---|
Get the Crabby Office Lady’s book
Read all the Crabby Office Lady columns
Get Crabby’s columns via RSS
View Crabby’s videos
Disclaimer
Frankly, I rarely start my columns with a disclaimer. I usually end up backpedaling in a future column over something I wrote in a previous one —but today I feel I must say this first. Some of my loyal readers are expert Office users, while others are beginners or somewhere in between the two. This column, about computer macros, is for the latter. You experts already know and have probably written hundreds — if not thousands — of macros. So you do not need to send me feedback that tells me I’m dumbing down to you. The purpose of this column is simply to provide information to anyone interested in how to make their work life more efficient through the use of macros. When your average computer user finds out that macros are all about little bits of code, the fear in their hearts becomes palpable, all the way from here. And so today I want to ease those fears and invite those of you who’ve been curious about macros to take the plunge and finally learn about them.
End of disclaimer
A robot that really is your friend
I once owned one of those low-to-the-ground robotic vacuum cleaners that goes round and round in ever-widening circles, allegedly picking up dirt, hair, and any bad memories you happened to have tossed under your bed. The thing worked pretty well but it didn’t really get to know my floors like, say, a housekeeper or I would. I could only program it for a small-, medium-, or large-sized room; there wasn’t anything else I could tell it to do. Needless to say, we soon parted ways.
Perhaps I expected more from my vacuum. Perhaps the fact that the company advertised it as a “robot” of sorts made me think it could do more than just go in circles and further neuroticize my dog. Perhaps I expected it to act like a macro.
A macro is not a trendy diet?
What does the word “macro” make you think of? Me, it makes me think of the “macrobiotic,” a term first coined by Hippocrates, the father of western medicine, to describe people who were long-lived and healthy. And although the Greek word “macro” means large or long, the diet itself is not about eating large or long things (1-pound cheeseburgers, gigantic lollypops, bananas). Again, it’s about living a long life.
Okay, so what does this all have to do with computer macros? Good question — we’re not going to be talking about dieting or speaking Greek today. In fact, I haven’t had a lot of success with either one.
Simply put, in the world of computers and software, a macro is a set of keystrokes and instructions that are recorded and saved under a short key code or macro name.
Okay, maybe that wasn’t so simply put — let’s try that again.
A macro is a bunch of commands grouped together as a single command to accomplish a task automatically. And when I say “command,” I mean things like clicking the B button to make text bold, applying a certain margin, or inserting a specific sort of table.
A macro is the shortcut of all shortcuts, it’s an “I’m at your command” genie, it’s a pattern or rule, and it’s the good kind of computer gremlin. A macro is a little computer program that you — yes YOU with no computer development knowledge — can create to make your computing life easier and more efficient.
Examples of what a macro can do
As I said, a macro is like a shortcut — it is something that can automate a long list of actions you need to do to accomplish one task. It rolls many steps into one.
For example, if you know that you will often use a highly stylized list, comprised of colored balls on the first level, tiny images of yourself on the second, and just an indent on the third level, you don’t have to reinvent the wheel every time you want to insert this list; you only have to create it once. You use something called a macro recorder, which works very much like a tape recorder: You basically record every keystroke, every button click, every command that you need to do in order to accomplish this one task, so that the next time you need to do this possibly complex set of actions, the macro will just repeat back what it observed. It’s like a monkey. Or a parrot. Or your three-year-old who repeats to his teacher everything that you’ve muttered under your breath to the slowpoke in front of you who hasn’t the decency to even drive the speed limit during your drive to preschool that day.
(Okay, so maybe I’m personifying macros, but I find them so helpful that I cannot bear to think of them as hidden code.)
You get ready to accomplish the exact task (in our case, the three-level bulleted list). You click the “record” button on the macro recorder, you go through each step to achieve the final outcome of the task, and then you click “stop.” Then you give your macro a name. Now, every time you want to insert that list anywhere (and not just in that document but anytime, in any document on the computer you created the macro on), you go to wherever in your particular program the macro function is located, find the name of the macro you recorded, click it, and voilà, your list is entered faster than you can say Bob’s-your-uncle (even if he isn’t). Or, when you’re creating your macro, you can assign it a short sequence of keystrokes, also called keyboard shortcuts, such as CTRL+SHIFT+1. Then every time you hit that combination of keystrokes, your fancy list will jump onto the page.
You can create a macro to do just about anything — to add blocks of text that you know you will need again and again in a document, to insert and format a table in Excel, and even to group objects together in Visio. Anything that you need to repeat can be recorded as a macro, saving you both time and the possibility of making a mistake.
Also know that you can set very specific boundaries on a macro (unlike my robotic vacuum, which went everywhere and ate everything in sight, except for that elusive dust bunny in that tight corner, of course). You can tell a macro to do this task only in this particular paragraph until … whenever. Macros are very good at following directions, but you have to be very specific with them. In other words, they take everything you say quite literally, so be careful what it is that you are telling them to do… In fact, I suggest that you try out your brand-new macro in a document or file that you can just use for practice purposes.
Hopefully, by now you can see how macros can give meaning to your long life and health while at your computer.
Bad macro! Bad macro!
Now that you know what writing a macro is about, you may be wondering about a term you may have heard: macro virus (boooo!). A macro virus is a computer virus that affects Word or Outlook or any other sort of software and causes — just like a regular macro — a sequence of actions to happen. And, as you may have already guessed, these are actions you don’t want to happen. They don’t make your life easier; they make it annoying and even encourage you to spread that annoyance around. We call them viruses because they aren’t good for you or your computer — they make your software or your entire computer sick, and they’re often hard to treat.
One of the most common macro viruses is an e-mail virus. If, for whatever reason, someone creates an e-mail macro virus, when you either open an attachment or even just start up your program, the virus that was sent to you causes bad things to happen. For example, in 1999, the “Melissa” virus was sent to people as an attachment, and when that attachment was opened, the virus re-sent itself to the first 50 people in each of the users’ address books. The Melissa virus didn’t actually destroy anything; it was more of a nuisance: It clogged a LOT of e-mail servers and slowed electronic communication down considerably. (How many times have I told you NOT to open attachments from people you don’t know? Huh? How many?)
And so, the moral of this story is: Just as with any sort of power, macros can be used for good as well as for evil. Which side are you on … hmmmm?
Helpful links
Talking about how and why to create a macro is all well and good; I’ll bet that you, being the studious Crabby-ites I know you to be, would like some step-by-step instructions for just how to do that, now wouldn’t you?
Using macros in the 2007 Office system
- Using macros in Access 2007
- Using macros in Excel 2007
- Using macros in PowerPoint 2007
- Using macros in Project 2007
- Using macros in Visio 2007
- Using macros in Word 2007
Using macros in Office 2003
- Using macros in Access 2003
- Using macros in Excel 2003
- Using macros in FrontPage 2003
- Using macros in PowerPoint 2003
- Using macros in Project 2003
- Using macros in Visio 2003
- Using macros in Word 2003
So, go on now: Fly, be free, and automate your work with a macro or two.
“Good ideas are not adopted automatically. They must be driven into practice with courageous patience.” — Hyman Rickover