Results 1 to 2 of 2
  1. #1
    2 Star Lounger
    Join Date
    Jan 2001
    Toronto, Canada, Ontario
    Thanked 0 Times in 0 Posts

    Junk Mail macro wanted (W XP, O2003)

    I'm afraid I can't do Visual Basic to save myself. I want a macro button that that selects Junk Mail from the menu, and then chooses the B choice - block sender.

    Any help?


  2. #2
    Uranium Lounger
    Join Date
    Dec 2000
    Salt Lake City, Utah, USA
    Thanked 6 Times in 6 Posts

    Re: Junk Mail macro wanted (W XP, O2003)

    I don't have a test base to see if this works correctly, because every one of my inbox messages gives me a message that:

    "The e-mail address for this sender is internal to your organization and cannot be added to this list."

    (No, I don't want you all to send me mail to test the code. <img src=/S/grin.gif border=0 alt=grin width=15 height=15>)

    This code is intended to work for multiple selected messages in any mailitems folder. For individual open messages the command is just a couple of clicks away, so I didn't see a point in handling that situation. I hope that one of the -good- coders can fix this for me, hint, hint.

    Sub MultipleMessagesBlockSenders()
    Dim lngC As Long
    For lngC = 1 To Outlook.ActiveExplorer.Selection.Count
    If Outlook.ActiveExplorer.Selection(lngC).Class = olMailItem Then _
    Outlook.ActiveExplorer.Selection(lngC).GetInspecto r.CommandBars.FindControl(, 9786).Execute
    Next lngC
    End Sub
    -John ... I float in liquid gardens
    UTC -7ąDS

Posting Permissions

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