I've searched and searched and been unable to find what I need. And know that I searched first not because I didn't think anyone here would know, but because I felt bad asking without having gone through some effort on my own.
You see, I'm lazy. And I get junk e-mail. Because of those two pieces of information, I want to be able to hit a single button to (a) Mark all selected items as read, (b) add all selected items to "Junk Senders List," and (c) move the selected items to the "Junk E-mail" folder.
In Excel, I could record a macro, get an idea of how the code was written, then extrapolate my own code (read: futz around until it worked) in cases where I couldn't do what I wanted with a simple recording (anything requiring a loop, for example). But Outlook doesn't have the option to record a macro, so I have to start from scratch, and I don't know the relevant commands/code. So I ask the compugurus or Hatrack. Help me save a couple clicks if you can. Thanks, team.
--Pop
Posted by Dagonee (Member # 5818) on :
I've never found a good reference for Outlook VBA. When I have had to do it in the past, I've used the code-suggest feature to zero in on the possible objects and methods and then tried various combinations until I figured out what did what.
And I never dealt with UI stuff, so I don't even have a hint for you. Sorry.
So I'm posting not to help, but to tell you not to feel bad that you couldn't find anything.
Dagonee
Posted by Papa Moose (Member # 1992) on :
Yeah -- I've used the code-suggest feature, too (though I didn't know it was called that), with positive results in Excel. I just can't get the information I'm looking for in Outlook.
So this stuff never came up in a court case you were referencing or anything, huh? Oh well....
Posted by Dagonee (Member # 5818) on :
quote:This code combines the frequently used steps of adding the senders of all selected e-mails to the Outlook "Junnk Sender's List" and then moving the messages to the junk mail folder. I then create a toolbar button associated with this "macro."
The core of which is based on code from Sue Mosher's article in Windows & .Net Magazine and the kludge to access the unpublished "Add to Junk Senders" is from Rick Pearce's post to the microsoft.public.outlook.program_vba newsgroup.
Dagonee P.S., I ran a software company that did mostly Microsoft development for 11 years in my pre-law days.
[ December 23, 2004, 07:12 PM: Message edited by: Dagonee ]
Posted by Dagonee (Member # 5818) on :
Bump 'cause I want to find out if the linked routine worked.
Posted by Dagonee (Member # 5818) on :
Bump because I saw you on briefly today and I still want to know the answer.
Posted by Dagonee (Member # 5818) on :
BadaBUMP since Papa's on right now! A nice technical problem can help distract from family issues.
[ January 03, 2005, 07:21 PM: Message edited by: Dagonee ]
Posted by Papa Moose (Member # 1992) on :
You're so sweet, dude.
I bookmarked the link, but I haven't tried it yet. It also appears to combine only two of the steps, rather than all three. But maybe I can combine it with other stuff I found in my searches and get everything to work. Thanks again for your efforts on my behalf.
--Pop
Posted by Dagonee (Member # 5818) on :
No problem. But my motivations are at least partly selfish, since if it works I'm going to try it.