views:

803

answers:

2

Hey there

I'm new to the world of C# programming but was hoping someone could help me out.

I'm trying to use C# to open up a blank email in Outlook with a specified attachment.
In other words, open the email, the TO: and SUBJECT: fields are blank but the email has an attachment that is specified in my code. I want my user to be able to modify the email and send to whatever users s/he specifies. I know for sure that we have Exchange....so any ideas?

A: 

I don't think exchange will help you much, you need to work with outlook on the users machine. You can add a reference to the Outlook interop assemblies, should be in the Com tab of your add references dialog.

Here's some links to jump start you.

http://msdn.microsoft.com/en-us/library/microsoft.office.interop.outlook.aspx http://www.microeye.com/resources/res_tech_vsnet.htm

Good Luck!

Joshua Belden
i have added the MS outlook 11.0 interop assembly...but what is the actual syntax for opening up a new email window?
This was from the second link I posted: http://support.microsoft.com/default.aspx?id=310263
Joshua Belden
A: 

There are a number of way you can do this.

Create an Outlook addin that opens a new mail with the attachment you want via say a new toolbar button.

Do the same in Outlook VBA macro ..

Also you could create a new form with the attachment in it already and then just us that form.(but the attachment will be hard coded etc.)

Does the attachment change ? or is it the same one evey time ? what outlook version are you using ? What are you programing capabilties ?

76mel

76mel