Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Save attachments in Outlook
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00760835
Message ID:
00760842
Vues:
17
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform