Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Outlook Email Attachments
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00261255
Message ID:
00261336
Views:
22
>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
Map
View

Click here to load this message in the networking platform