Sending email with attachment using Outlook 2000

vincehhw

New member
Joined
Dec 16, 2003
Messages
4
Does anyone out there know how to insert an attachment while sending email using outlook 2000 with C#.Net or VB.Net?

I clearly know that i can use the code below to do the job: -

>Outlook.MailItem oMailitem;
>oMailitem.Attachments.Add(object Source, object Type, object Position, object DisplayName);

The problem I have is on what to insert to the variable of object Type, object Position and object DisplayName.

Thanks for your help in advance...
 
Source: is a string representing the full path of the file. (It can also be an attachment object)

Type: is an Integer representing the type of attachment olByValue(1), olByReference(4), olEmbeddedItem(5)

olByValue: Embed the attachment in the item
olByReference: Create a shortcut to an external file
olEmbeddedItem: Create a shortcut to an Outlook item

Position: is an Integer representing the position of the attachment in the body of the attachment.

DisplayName is a string representing the name displayed for the attachment. It is only valid if your Type is olByValue.
 
Back
Top