Consulting

Results 1 to 8 of 8

Thread: Solved: Need Envelope Macro

  1. #1
    VBAX Regular
    Joined
    Jun 2004
    Location
    Foothill Ranch, CA--God's Country
    Posts
    13
    Location

    Solved: Need Envelope Macro

    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.

  2. #2
    VBAX Master TonyJollans's Avatar
    Joined
    May 2004
    Location
    Norfolk, England
    Posts
    2,291
    Location
    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?
    Enjoy,
    Tony

    ---------------------------------------------------------------
    Give a man a fish and he'll eat for a day.
    Teach him how to fish and he'll sit in a boat and drink beer all day.

    I'm (slowly) building my own site: www.WordArticles.com

  3. #3
    Site Admin
    The Princess
    VBAX Guru Anne Troy's Avatar
    Joined
    May 2004
    Location
    Arlington Heights, IL
    Posts
    2,530
    Location
    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...s&LabelsTricks

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

  4. #4
    Site Admin
    The Princess VBAX Guru Anne Troy's Avatar
    Joined
    May 2004
    Location
    Arlington Heights, IL
    Posts
    2,530
    Location
    Hm. Chris...don't you have a CANCEL button?
    Anyway, I'd still hate hitting all those buttons if I used this feature regularly.
    ~Anne Troy

  5. #5
    VBAX Master TonyJollans's Avatar
    Joined
    May 2004
    Location
    Norfolk, England
    Posts
    2,291
    Location
    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.
    Enjoy,
    Tony

    ---------------------------------------------------------------
    Give a man a fish and he'll eat for a day.
    Teach him how to fish and he'll sit in a boat and drink beer all day.

    I'm (slowly) building my own site: www.WordArticles.com

  6. #6
    Site Admin
    The Princess VBAX Guru Anne Troy's Avatar
    Joined
    May 2004
    Location
    Arlington Heights, IL
    Posts
    2,530
    Location
    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!!
    ~Anne Troy

  7. #7
    VBAX Regular
    Joined
    Jun 2004
    Location
    Foothill Ranch, CA--God's Country
    Posts
    13
    Location
    Quote Originally Posted by TonyJollans
    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.

  8. #8
    Site Admin
    The Princess VBAX Guru Anne Troy's Avatar
    Joined
    May 2004
    Location
    Arlington Heights, IL
    Posts
    2,530
    Location
    Marked Solved.
    ~Anne Troy

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •