Hi..
can anyone tell me how to add an attachment to an outlook object???
this is my code so far...
public void addToOutBox(string toValue, string subjectValue, string bodyValue, ArrayList documents)
{
//creates the MailItem object
Outlook._MailItem oMailItem = (Outlook._MailItem)oApp.CreateItem(Outlook.OlItemType.olMailItem);
oMailItem.To = toValue;
oMailItem.Subject = subjectValue;
oMailItem.Body = bodyValue;
foreach(String item in documents)
{
oMailItem.Attachments.Add(item,??????
}
oMailItem.SaveSentMessageFolder = oOutboxFolder;
//adds it to the outbox
oMailItem.Send();
}
in theArraylist i pass to the function is an collection of adresses to the documents i want to attach.. ie c:\temp\temp.txt.
can anyone help. plz