By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,984 Members | 1,009 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,984 IT Pros & Developers. It's quick & easy.

MSMAPI32 and Outlook

P: n/a
I've developed an application that uses the MSMAPI32 OCX to send an e-mail through the default e-mail client application

Here is the code


axMAPIMessages1.SessionID = axMAPISession1.SessionID
axMAPIMessages1.AttachmentPathName = attachfilename


Everything works perfectly with Outlook Express (and Netscape Mail), while with Outlook I get the following error message


************** Exception Text *************
System.Runtime.InteropServices.COMException (0x800A7D02): Unspecifie
Failure has occurre
at MSMAPI.IMapiMessages.Send(Object vDialog
at AxMSMAPI.AxMAPIMessages.Send(Object vDialog
at MyCalc.Form1.SendReportByMail(
at MyCalc.Form1.btMail_Click(Object sender
EventArgs e
at System.Windows.Forms.Control.OnClick(EventArgs e
at System.Windows.Forms.Button.OnClick(EventArgs e
at System.Windows.Forms.Button.OnMouseUp(MouseEventAr gs mevent
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButton
button, Int32 clicks
at System.Windows.Forms.Control.WndProc(Message& m
at System.Windows.Forms.ButtonBase.WndProc(Message& m
at System.Windows.Forms.Button.WndProc(Message& m
at System.Windows.Forms.ControlNativeWindow.OnMessage (Message& m
at System.Windows.Forms.ControlNativeWindow.WndProc(M essage& m
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg
IntPtr wparam, IntPtr lparam


I've found out that the problem is given by the instruction that attaches a file to the e-mail message
axMAPIMessages1.AttachmentPathName = attachfilename

Can anybody help me



Jul 21 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.