Click here to Skip to main content
15,881,413 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I would like to write for sending Email using Outlook's api,
and I want to attach many file.
I only could use for only one file by writing the below code,
How should I write for multiple attachement file?

C#
objMail.Attachments.Add((object)fileAttachTextBox.Text,
                   Outlook.OlAttachmentType.olEmbeddeditem, 1, (object)"Attachment");



thanks,
ttds
Posted
Comments
ZurdoDev 20-Mar-13 12:05pm    
Have you tried calling objMail.Attachments.Add() again?

1 solution

Hi ttds,
I know this might sound silly now, but I recognised that your 'objMail' has the member 'Attachements', where extra emphasis is placed on the 's' after attachment. As a naive newbie to the outlook-api I would wonder if it's not possible simply to write this same statement again in order to add another attachment?

If this is not of much help, I would then suggest you to have a look at MAPIEx: which is a wrapper for the Extended Mapi by Noel Dillabough. It is implemented for both C++ and .Net, which would you enable to use it. Generally it's very well crafted and straight-forward to use.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900