General information
Category:
Coding, syntax & commands
>I have an application that sends outlook emails with an attachment from on the road personnel. I want to write a process that will pick the attachment and put the records in my table.
>
>Anyone have any idea how to do this. All the research I've done shows how to send.
>
>Thanks in advance.
Check out the SaveAsFile method of the attachment object and the Items collection in Outlook Forms help:
Local oOL, oNS, oMsg, oAtt, oInbox
oOL=CreateObject("Outlook.Application")
oNS=oOl.GetNameSpace("MAPI")
oInbox=oNS.GetDefaultFolder(6) && olFolderInbox
oMsg=oInbox.Items("Book4.xls") && Subject of message goes here
oAtt=oMsg.Attachments
oAtt.Item(1).SaveAsFile("D:\Temp\" + oAtt.Item(1).Displayname)
Of course you will have to know the subject line beforehand. HTH
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only