Re: Automatically save attachment from specific sender
- From: RichardSchollar <RichardSchollar@xxxxxxxxxxxxxx>
- Date: Tue, 5 Feb 2008 08:18:45 -0800 (PST)
Ken
I appreciate the help - I will be looking to implement this as soon as
I can. Thank you very much!
Richard
On 5 Feb, 15:59, "Ken Slovak - [MVP - Outlook]" <kenslo...@xxxxxxxx>
wrote:
I'd go with a macro called by a rule myself. That way you can set the rule
to fire when emails come in from specific senders that have one or more
attachments.
For a macro called by a rule the format is pretty simple. You set the rule
to run a script, which is your macro. The macro has a format of being Public
and having only 1 input argument, the MailItem that triggered the rule. So
the macro would look something like this:
Public Sub myRuleMacro(Item As Outlook.MailItem)
' code here
End Sub
For saving the attachment you can modify the attachment saving code athttp://www.slovaktech.com/code_samples.htm#StripAttachments, which saves all
attachments in the currently selected items in a folder. You can remove the
loop and use the Item passed to you as the handle for the item to remove
attachments from.
--
Ken Slovak
[MVP - Outlook]http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Optionshttp://www.slovaktech.com/products.htm
"RichardSchollar" <RichardSchol...@xxxxxxxxxxxxxx> wrote in message
news:d32c4b57-3f81-4dc2-9740-f306d5ea169e@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi
I want to automatically save down an attachment from a specified
sender to a specified directory on my computer. I rarely have ever
used Outlook VBA, so I am after some guidance and possibly sample
code.
Having looked at the ThisOutlookSession module in the VBE am I correct
in thinking that I could use the event
Application_NewMailEx(ByVal EntryIDCollection As String)
to check for new mail from a specified contact and if an attachment is
present to save the attachment down to folder X? I would subsequently
like to display a message alert on the desktop.
Will this work in the background? ie I spend most of my time in Excel,
so I would like Outlook to silently monitor incoming email and process
it automatically, just alerting me when the file is saved down to the
directory.
I did consider using Rules, but couldn't see any way to get a macro to
fire from the rule (so this may be down to my ineptitude rather than
it not being possible).
Any help forthcoming is appreciated.
Richard- Hide quoted text -
- Show quoted text -
.
- References:
- Automatically save attachment from specific sender
- From: RichardSchollar
- Re: Automatically save attachment from specific sender
- From: Ken Slovak - [MVP - Outlook]
- Automatically save attachment from specific sender
- Prev by Date: Re: Temporarily Exclude sender ABC from distribution list
- Next by Date: Re: close reminder window programatically
- Previous by thread: Re: Automatically save attachment from specific sender
- Next by thread: RE: Automatically save attachment from specific sender
- Index(es):
Relevant Pages
|