Because you did not tell us the name(s) of the folders, and we're
unaware of what type of folder they are, I'm going to quote a response
to a similar question that was answered by Microsoft Outlook MVP, Sue
Mosher at www.outlookcode.com to a similar question. The only
difference is that the person wanted to select multiple items, instead
of just one. I figure you'll want to select multiple too, even tho you
didn't state that.
--------quote----------
The building blocks you need to put this together:
1) The ActiveExplorer.Selection collection to work with all selected items.
2) To get a default folder, use Namespace.GetDefaultFolder. To get a
non-default folder, you need to walk the folder hierarchy using the
Folders collections or use a function that does that for you. See
http://www.outlookcode.com/d/code/getfolder.htm
3) To move items, use the Move method, but do it within a countdown
loop or a Do loop, not a For EAch ... Next loop.
4) See http://www.slipstick.com/outlook/toolbar.htm#macro to add your
macro to the toolbar.
If you're new to Outlook VBA macros, these web pages should help you get started:
http://www.winnetmag.com/Articles/Index.cfm?ArticleID=21522&pg=1
http://www.outlookcode.com/d/vb.htm
------------end quote------------- |