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
ttds801
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 OriginalGriff 275
1 DamithSL 265
2 CPallini 235
3 Maciej Los 185
4 George Jonsson 170
0 OriginalGriff 5,415
1 DamithSL 4,422
2 Maciej Los 3,820
3 Kornfeld Eliyahu Peter 3,470
4 Sergey Alexandrovich Kryukov 2,911


Advertise | Privacy | Mobile
Web04 | 2.8.141216.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