A Microsoft Outlook email forum. Outlook Banter

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.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

save attachment using outlook 2007



 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old March 10th 09, 06:51 PM posted to microsoft.public.outlook.program_vba
Jim
external usenet poster
 
Posts: 230
Default save attachment using outlook 2007

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
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


All times are GMT +1. The time now is 02:43 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.