Click here to Skip to main content
11,577,443 members (59,088 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#4.0
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?

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


thanks,
ttds
Posted 20-Mar-13 5:57am
ttds833
Comments
ryanb31 at 20-Mar-13 12:05pm
   
Have you tried calling objMail.Attachments.Add() again?

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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.
  Permalink  

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

  Print Answers RSS
0 DamithSL 180
1 Afzaal Ahmad Zeeshan 125
2 OriginalGriff 115
3 Richard MacCutchan 100
4 Abhinav S 90
0 OriginalGriff 820
1 Sergey Alexandrovich Kryukov 681
2 Abhinav S 528
3 F-ES Sitecore 420
4 Suvendu Shekhar Giri 375


Advertise | Privacy | Mobile
Web04 | 2.8.150603.1 | Last Updated 20 Mar 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100