![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
Hi,
I'm trying to implement a solution that saves all my attachments in a folder automatically. I found the code below that is a good start. However, I have some questions: 1.) How can I make a simple method like the one below visible in the outlook menu or toolbar? 2.) I would like to run a "rule" and execute a script when I receive an email with attachment. I know how to setup the rule. But I don't know how to structure the script to receive the proper input value and execute SaveAs only for this email Any help would be appreciated. Private Sub SaveAttachements() Const olFolderInbox = 6 Set objOutlook = CreateObject("Outlook.Application") Set objNamespace = objOutlook.GetNamespace("MAPI") Set objFolder = objNamespace.GetDefaultFolder(olFolderInbox) Set colItems = objFolder.Items Set objFSO = CreateObject("Scripting.FileSystemObject") On Error Resume Next For Each objMessage In colItems intCount = objMessage.Attachments.Count If intCount 0 Then For i = 1 To intCount strTempFile = objFSO.GetTempName objMessage.Attachments.Item(i).SaveAsFile "C:\mailarchive\attachments\" & strTempFile & "_" & _ objMessage.Attachments.Item(i).FileName Next End If Next End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Saving Photos | B.W. | Outlook Express | 2 | October 20th 07 06:32 AM |
Stopping automatically saving email adresses to my contacts? | [email protected] | Outlook - Using Contacts | 1 | August 2nd 06 07:08 PM |
Automatically saving attachments of a pst into windows folder | Christian Goeller | Outlook - General Queries | 0 | March 28th 06 10:23 AM |
Saving Attachments | [email protected] | Add-ins for Outlook | 0 | January 11th 06 07:27 PM |
Saving emails | Daniel | Outlook Express | 3 | January 9th 06 01:35 PM |