Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
This is what I tried:
olFolderInbox=6 MSapp = ObjectCreate ("Outlook.Application") oNameSpace = MSapp.GetNamespace("MAPI") oFolder = oNameSpace.GetDefaultFolder(olFolderInbox) ofolderitems=oFolder.Items For a = 1 to ofolderItems.count oMessage = oFolder.Items(a) if oMessage.senderName == "Sender" Attachments = oMessage.Attachments Attachment = Attachments.Item(1) fname = Attachment.filename Attachment.SaveAsFile("C:\windows\desktop\%fname%") break endif NextAny suggestions?
olFolderInbox=6 SaveTo = "C:\windows\desktop\" MSapp = ObjectCreate ("Outlook.Application") oNameSpace = MSapp.GetNamespace("MAPI") oFolder = oNameSpace.GetDefaultFolder(olFolderInbox) oFolderItems=oFolder.Items msgcount = oFolderItems.count For a = 1 to msgcount oMessage = oFolderItems.Item(a) oAttachments = oMessage.Attachments attachcount = oAttachments.Count For b = 1 to attachcount oAttachItem = oAttachments.Item(b) fname = oAttachItem.filename filetosave = StrCat(SaveTo,fname) oAttachItem.SaveAsFile(filetosave) oAttachItem = 0 Next oAttachments = 0 oMessage = 0 Next oFolderItems = 0 oFolder = 0 oNameSpace = 0 MSapp = 0
Article ID: W16095
File Created: 2009:04:01:10:30:50
Last Updated: 2009:04:01:10:30:50