Click here to Skip to main content
11,647,170 members (69,993 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
ttds849
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 jyo.net 510
1 Sergey Alexandrovich Kryukov 423
2 OriginalGriff 398
3 CPallini 339
4 DamithSL 300
0 OriginalGriff 1,277
1 jyo.net 994
2 DamithSL 946
3 Sergey Alexandrovich Kryukov 853
4 CPallini 760


Advertise | Privacy | Mobile
Web02 | 2.8.150804.2 | 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