Automatic forward from a personal folder

M

Michel

Hello everyone,

I'm using Outlook 2003 on Exchange server.

I would like to have a button added to my toolbar to
perform following actions :

- all mails in the personal folder "X" (if it is not
empty at that moment !) are forwarded to an external e-
mail address (always the same,
like "(e-mail address removed)")

- ideally, these forwarded mails should not be saved in
the "Sent items" folders

- and after processing, the original mails are removed (=
deleted) from the personal folder "X"

I guess this can be achieved through VBA ...but
unfortunately, I know very little about VBA-programming.
I did some research on the internet but so far, I didn't
find an example of written code corresponding to such
process.

Can someone help me ? And how do I manage to have a new
button added to the toolbar ?

I would appreciate any help, thank you.

Michel
 
M

Michel

Eric,

Thanks a lot for your precious help.
Two more questions, if I may.

The folder from which the e-mails will be forwarded will
always be the same. It will be a personal folder, let's
assume it will be called "ToX".
I suppose it's possible to modify the code you've written
so that this folder is automatically used by the macro ?
("hard-coded"). I guess that the instruction "Set
objFolder = ActiveExplorer.CurrentFolder" is the one to
be adapted, but how ?

My second question is about Outlook Redemption. I've had
a look at the web site you've pointed to. Does it mean
that the file just has to be installed on the client-PC ?

Once again, thank you for your time to help users like
me !

Michel
 
G

Guest

If you want to get a specific folder, you have to "walk" through the Folders
collection for various MAPIFolder objects. It all starts with the Namespace
object's Folders collection. This contains all the loaded .pst's - one
Folders collection for each. If you only have one .pst, it will be the first
in the collection - Namespace.Folders.Item(1). You need to get a MAPIFolder
object from that collection, and then its Folders collection will contain
every folder you see at the same level as your default folders (Inbox,
Calendar, etc.). Keep getting a specific folder and then walk its Folders
collection to get a specific subfolder.

See http://www.outlookcode.com for a bunch of examples that can help you.

You have to install Redemption, plus you have to alter your code to use
Redemption objects. See its website for code samples.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top