Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HOW TO ATTACH MULTIPLE FILES USING MAPI.SESSION?

Status
Not open for further replies.

dennis22

Programmer
Oct 8, 2002
32
Hi! I have downloaded a form that sends email with attachment. It works just fine!

But is there a way to attach multiple files using MAPI.SESSION?

OleMsg.AttachmentPathname = cFileAttach

where: cFileAttach = "C:\Mytable.DBF"
This works just fine!

But when I try this;
OleMsg.AttachmentPathname = cFileAttach1
OleMsg.AttachmentPathname = cFileAttach2
OleMsg.AttachmentPathname = cFileAttach3

where: cFileAttach1 = "C:\Mytable.DBF"
cFileAttach2 = "C:\Mytable.CDX"
cFileAttach3 = "C:\Mytable.FPT"

I only receive C:\MyTable.Fpt?

Is there a way to add multiple attacments using MAPI?

I hope someone can help me with this problem.

Thanks! Thanks! and Thanks!
 

Thanks Sir Cris!

How about the "AttachmentPathname" property of MAPI SESSION?
Any idea about that sir?


 
abcdennis22

FAQ184-1769 Will show you how to do multiple attachements with a MAPI session. The problem is the position of the attachements has to be changed at every attachements. Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Thanks Sir Mike!

That FAQ helps a lot...

Thanks! Thanks! Thanks!
 
Just an additional note.

The length of the message must be longer in bytes than the number of attachehments.

I ran into this problem when I was trying to send 10 attachements with a message that just said 'Update'.

Pad the message out with blanks if needed.

You also might want to look at compressing the files into one archive files (zip, rar etc.) There are a number of ways to do that and DBFs frequently conpress by a factor of 8 to 10.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top