Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Identify attachment extension
Message
From
23/05/2010 14:28:17
 
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
01460476
Message ID:
01465643
Views:
28
just got around to using this - i found the code works but set up as follows, with thanks
if 'gif' $justext(lcFileName)  = .T.
k

>>In Outlook automation, is there a quick way to identify the type of attachment(s) that accompany an email.
>>i am trying to get rid of superfluous .gifs that sometimes come with emails - but wish to store all others
>>Here is my code to store the attachments:
>>
>>loAttach = loMSG.attachments   && attachments object
>>llAttach = Iif(loAttach.Count > 0,.T.,.F.)   && number of attachments
>>For Each loAttachment In loMSG.attachments
>>loAttachment.SaveAsFile("c:\attachments\"+loAttachment.filename)   && save attachment
>>Next
>>
>>as it now stands it's not until the attachments are stored that i can sift through them.
>>
>>thanks for help.
>>
>>k
>
>loAttach = loMSG.attachments   && attachments object
>llAttach = loAttach.Count > 0   
>For Each loAttachment In loMSG.attachments
>   lcFileName = loAttachment.filename
>   if lower(justext(lcFileName) ) != 'gifs' && what about exe? 
>       loAttachment.SaveAsFile("c:\attachments\"+lcFileName)   && save attachment
>   endif
>next
>
Previous
Reply
Map
View

Click here to load this message in the networking platform