Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Finding name of message attachments using Mapi
Message
 
 
To
06/10/1998 16:15:11
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00143626
Message ID:
00144392
Views:
37
Mike,

Maybe someone else using Exchange can help. FWIW this code works for me using OE4.01:
* GetAttachment()
if ( this.oleMAPISession.SessionID = 0 )
   return
endif

with this.oleMAPIMessages
   this.mcAttachmentName = ""
   this.mcAttachmentPathName = ""
   this.mnAttachmentType = 0
   if ( this.mnAttachmentIndex < this.mnAttachmentCount - 1 )
      .AttachmentIndex = this.mnAttachmentIndex
      this.mcAttachmentName = .AttachmentName
      this.mcAttachmentPathName = .AttachmentPathName
      this.mnAttachmentType = .AttachmentType
   endif
endwith

return this.mcAttachmentName

* GetNextAttachment()
if ( this.oleMAPISession.SessionID = 0 )
   return
endif

local lcRetVal

if ( this.mnAttachmentIndex < this.mnAttachmentCount - 2 )
   this.mnAttachmentIndex = this.mnAttachmentIndex + 1
   lcRetVal = this.GetAttachment()
else
   lcRetVal = ""
endif

return lcRetVal
Although you only have to make a call to GetAttachment, that action causes all the attachments to be extracted into the sys(2023) folder then you can copy them from there.
>I'm using MSExchange
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Reply
Map
View

Click here to load this message in the networking platform