View Single Post
  #5  
Old April 7th 07, 06:26 AM posted to microsoft.public.outlook.program_vba
Eric Legault [MVP - Outlook]
external usenet poster
 
Posts: 830
Default Creating a menu or command button in Outlook

It could actually be a lot easier than using the Organizer feature - the
"Move to Folder" button rememebers the last 10 folders you've moved an item
to. Just do it once and you'll most likely never have to browse to the
folder very often. However, I still use a "Move To Projects Folder"
button/macro for those instances where I'm too darn lazy to select the folder
if I so happened to have moved previous items to 10 other folders in the
interim.

We developers of course love to overthink things and do it the hard way, but
I'm sure your users would be more than happy with the existing feature - no
code, no mess!

--
Eric Legault (Outlook MVP, MCDBA, MCTS: Messaging & Collaboration)
Try Picture Attachments Wizard for Outlook:
http://www.collaborativeinnovations.ca
Blog: http://blogs.officezealot.com/legault/


"salad" wrote:

Eric Legault [MVP - Outlook] wrote:
It sounds like you have little programming experience, so this may be a
challenge for you. But what you want to do is fairly easy. All macros that
you code in Outlook can be mapped to a custom button. And the code to move
an item basically involves:


Hi Eric. Instead of reinventing the wheel I believe the Outlook
Organizer Pane will do exactly what I need to do. I wouldn't have to
distribute anything except provide instructions on how to open the
Organizer window, maybe put it on their standard toolbar if it doesn't
already reside there.

I guess you could say I'm a newbie regarding Outlook and haven't fully
explored it's capabilites.

Again, thanks for the link and info you provided.

- capturing the selection with the Explorer.Selection object
- setting a MAPIFolder reference to the desired folder by using the Folders
collection
- calling Item.Move to move the message

However, macros cannot be easily distributed to many users. See this page
for more info:

Distributing Microsoft Outlook VBA Code:
http://www.outlookcode.com/d/distributevba.htm

Ideally, you would need a professional developer to write the code as a COM
Add-In, which can be easily distributed with a setup package.


Ads