PDA

View Full Version : Solved: Need Envelope Macro



Mulder
06-23-2004, 12:20 PM
I need a macro that brings up the envelope command and automatically includes the text where the cursor is. I tried creating one, but of course, I can't stop it without hitting "print" and then the macro it includes the current address I used permanently. In other words, I need a macro that will execute "Tools", "Letter & Mailings", "Envelopes & Labels" as if I had gone though the keystrokes, but stop there so I can hit print manually and include the address where the cursor is.

TonyJollans
06-24-2004, 10:29 AM
I'm not entirely sure what you want here. I'm probably being thick but it isn't hard to make the menu selection (and you can always use Tools > Customize to put the Envelopes and Labels icon on permanent display). What do you want that you don't get straight from the menu selection?

Anne Troy
06-24-2004, 02:47 PM
Hi, Tony. Chris (Mulder) emailed me first. Apparently, it won't let him *escape* out of it, you know?

So I suggested a macro that'll just print to an envelope, i.e., click in any line of the address (assuming that it should encompass any paragraphs upward from insertion point that have at least one character, and downward from the insertion point that have at least one character), copy it and paste it into an envelope. I can provide an envelope template if it's easier.

So many people have problems with the print direction of that feature, that I've always given them this workaround: http://www.theofficeexperts.com/word.htm#Envelopes&LabelsTricks

But I think Chris's idea of a macro to do it is even better.

Anne Troy
06-24-2004, 02:48 PM
Hm. Chris...don't you have a CANCEL button?
Anyway, I'd still hate hitting all those buttons if I used this feature regularly.

TonyJollans
06-24-2004, 04:12 PM
Hi Anne,

I agree envelopes can be a PITA and I've done something very similar because I couldn't get the envelope object to communicate properly with the printer except when it was created via the dialog.

BUT, from the question he seems to just want the dialog displayed so he can then do his stuff. I don't know the rules off the top of my head but isn't the default behaviour to do more or less as you say (except that if it can't identify text at the insertion point, it tries to identify an address at the top of the letter)?

If you put an icon on the toolbar for Envelopes and Labels (I assume Letters and Mailings is a 2K2 or 2K3 variant on my 2K version which just has it under the Tools Menu) then it's only two clicks to print and you can't get less than that if you want the option to change the (default) address. Actually thinking about it, it might be three clicks if the dialog comes up with the Labels tab open - and I agree that might be too many for a regularly used feature.

Writing code isn't the problem here, I'm afraid it's understanding the requirement. As I said, it's probably me being thick.

Anne Troy
06-24-2004, 07:15 PM
Yes, 2002 variant.

I'd actually like Chris to come tell us why he can't cancel the operation. Perhaps he just worded it funny in his email to me, and meant something that I'm not understanding.

We KNOW you're being THICK. That's a given. LOL!!

Mulder
06-26-2004, 10:56 AM
I'm not entirely sure what you want here. I'm probably being thick but it isn't hard to make the menu selection (and you can always use Tools > Customize to put the Envelopes and Labels icon on permanent display). What do you want that you don't get straight from the menu selection?
I didn't realize I could drag the "Envelopes and Labels" icon up as a separate button--that solves my issue (I always just wrote the macros and then pulled them up to my toolbar--never really tried anything else). I just wanted a "one-click" choice to pull the evnvelope choice up to one of my toolbars. Thank you for the help.

Anne Troy
06-26-2004, 11:00 AM
Marked Solved. :)