Automatic forwarding of attachments only

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have messages that are sent to me that contain dozens of email messages
sent as attachments.
I would like to be able to create a macro that will forward each of the
attached messages to a specific email address.
Due to the fact that there are literally hundreds of these messages attached
to one message, it is incredibly time consuming to open an attached message,
enter the address to be forwarded to and then send the forward then close it,
select the next attachment, rinse and repeat.
I have some experience with creating macros in Excel, but I usually record
what I want to do, then modify it afterwards. I haven't seen a record option
in Macros for Outlook.
This is Outlook 2007.

Thanks in advance for any guidance.
 
Please see the sample in the VBA help file for the ItemAdd event. That event
tells you if a new message arrives. In that event loop through the item's
Attachment collection, create a new e-mail with CreateItem function for each
attachment, write the receiver's address into the To field and something
into Subject. Then call the e-mails Send function.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
Keep your Outlook categories organized!
http://www.shareit.com/product.html?productid=300120654&languageid=1
(German: http://www.VBOffice.net/product.html?pub=6)

Am Tue, 30 Jan 2007 14:57:02 -0800 schrieb Fleone:
 
I looked at the examples for ItemAdd event both Items object and Results
object and to be honest, I don't see how either of those two samples would
apply to what I would like to do.

I have been looking for a real answer to this question in several locations
and it is starting to look like it really can't be done the way I would like
it to run.

Please understand that I have LIMITED at best knowledge of VB and that has
been gained by reworking recorded macros in Microsoft Excel. I am seeing a
pretty substantial difference between Excel and Outlook and this only adds to
my confusion.
At this point I would be completely happy with the ability to open an email
message that contains dozens of identically named attached messages and
forward each of the attached messages to one other address.
So - Can this be accomplished without saying.....well here's the help file,
figure it out?

Thanks in advance anyone!
 
So far it isn't clear how you want it to run. The ItemAdd event is good if
you want to handle messages automatically as soon as they come in. But if
you want to open a message then you probably need a button to start the
process.

ItemAdd gives you an Item object with a reference to the message, against
which you'd use ActiveInspector.CurrentItem for an open message.

In both cases the Item object has an Attachments collection. You can loop
through it with:

Dim att as Outlook.Attachment
Dim Mail as Outlook.MailItem

' Assuming that the variable Mail is set to Item in ItemAdd or
ActiveInspector.CurrentItem

For Each att in Mail.Attachments
' do somethign with the Attachment att
Next

I really like to assist you but it's up to you to write your code.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
Keep your Outlook categories organized!
http://www.shareit.com/product.html?productid=300120654&languageid=1
(German: http://www.VBOffice.net/product.html?pub=6)

Am Mon, 5 Feb 2007 15:58:00 -0800 schrieb Fleone:
 
Back
Top