Click here to Skip to main content
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 6:57am
ttds771
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 Sergey Alexandrovich Kryukov 485
1 OriginalGriff 310
2 Shweta N Mishra 244
3 Mathew Soji 225
4 BillWoodruff 200
0 OriginalGriff 6,153
1 Sergey Alexandrovich Kryukov 5,758
2 DamithSL 4,958
3 Manas Bhardwaj 4,539
4 Maciej Los 3,735


Advertise | Privacy | Mobile
Web01 | 2.8.1411019.1 | Last Updated 20 Mar 2013
Copyright © CodeProject, 1999-2014
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