Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Save attachments in Outlook
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00760835
Message ID:
00760842
Views:
18
This message has been marked as a message which has helped to the initial question of the thread.
Try this:

with loNewOrders
for ib=1 to .Items.count
for iatt=1 to .items(ib).Attachments.Count

*?space(5),.items(ib).Attachments(iatt).Readattachment.Type,;
space(2), .items(ib).Attachments(iatt).Readattachment.DisplayName, ;
space(2),.items(ib).Attachments(iatt).Readattachment.FileNAme

.items(ib).Attachments(iatt).Saveasfile("c:\"+.items(ib).Attachments(iatt).Readattachment.FileNAme)
endfor
endfor
.....

>Hi,
>
>I am having some problems saving an email attachment programatically. This is the code I have so far:
>
>Public poOutlook as Outlook.Application,;
> poNamespace as Outlook.Namespace
>
>Local lcMailBox, lcNewOrdersFolder
>lcMailBox = "Mailbox - Einar Kvandahl"
>lcNewOrdersFolder = "New Orders"
>
>poOutlook = CreateObject("Outlook.Application")
>poNamespace = poOutlook.GetNamespace("MAPI")
>
>loNewOrders = poNamespace.Folders(lcMailBox).Folders(lcNewOrdersFolder)
>
>
>For each item in loNewOrders.Items
> * Attachment code here
>Next item
>
>Release poOutlook, poNamespace
>
>Could anybody help me with the code I need to put where it says "Attachment code here"?
>
>Thanks,
>Einar
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform