![]() |
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
|
|||
|
|||
![]()
I have written a code to save and rename an attachment after an outlook rule
sorts the email into a folder. My issue is that I wrote it for outlook 2003 and we are currently being upgraded to outlook 2007. I have not programmed in 2007 (I am new to programming) and I am hoping someone can shed some light on what changes I need to make so that it runs. Here is what I have: Sub CAMPMM2(Item As Outlook.MailItem) Set FSOC = CreateObject("scripting.filesystemobject") filecountC = FSOC.GetFolder("M:\CAMPMM\").Files.Count If filecontC 0 Then FSOC.deletefile "M:\CAMPMM\CAMPMM.zip" End If For Each Atmt In Item.Attachments ' This filename path must exist! Change folder name as necessary. ext = Atmt.FileName ext = Right(ext, Len(ext) - InStrRev(ext, ".") + 1) FileName = "M:\CAMPMM\CAMPMM" & ext 'Atmt.SaveAsFile FileName Atmt.SaveAsFile FileName i = i + 1 'Set Item = Item.FindNext Next Atmt End Sub Thanks - Jim |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Save Attachment via VBA | Roger Converse | Outlook and VBA | 5 | January 14th 08 05:16 PM |
Missing The Prompt To Open OR Save An Attachment In Outlook 2003 | [email protected] | Outlook - General Queries | 1 | August 29th 07 12:38 AM |
How to save attachment automatically in Outlook 2003? | joannele71 | Outlook and VBA | 17 | June 15th 07 08:44 PM |
unable to save attachment-- Outlook 2003, C# | Krishna | Add-ins for Outlook | 2 | January 29th 07 05:54 PM |
How do I save an outlook calendar to send as an attachment? | blancogato | Outlook - Calandaring | 1 | August 1st 06 03:54 AM |