473,414 Members | 1,848 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

MSMAPI32 and Outlook

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

----------------------

axMAPISession1.SignOn()
axMAPIMessages1.SessionID = axMAPISession1.SessionID
axMAPIMessages1.Compose()
axMAPIMessages1.AttachmentPathName = attachfilename
axMAPIMessages1.Send(true)
axMAPISession1.SignOff()

----------------------

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

Thanks

Ma

Jul 21 '05 #1
0 2509

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Fritz Switzer | last post by:
Can anyone provide a small snippet in C# that pulls out the Contacts in Outlook XP. I've seen a couple of examples in C++ and VB in previous newsgroup posts, but either the originals didn't work...
10
by: John | last post by:
Hi When I open a new outlook email from vb.net, sometimes outlook is very slow to appear or occasionally outlook freezes completely. I am targeting mixed office2000/xp environments so I am...
9
by: Srinivas | last post by:
hi all how to access the outlook user profiles through VB.net any help.... thanks in advanc Srinivas
9
by: George McCullen | last post by:
I have an Outlook 2003 using Exchange Server 2003 Public Contacts Folder containing 20,000 Contacts. I am writing a VB .Net 2003 program that loops through all the contacts in a "for each oCt in...
3
by: John | last post by:
Hi I am trying to access outlook contacts folders and delete the contacts that do not contain a certain category value in the categories field. I have written the below code but am stuck with...
7
by: Chris Thunell | last post by:
I'm trying to loop through an exchange public folder contact list, get some information out of each item, and then put it into a vb.net datatable. I run though the code and all works fine until i...
0
by: MaxHm | last post by:
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 ---------------------- axMAPISession1.SignOn()...
3
by: wizzbangca | last post by:
Hi everyone. Having problems with a utility I am writing for work. The previous IT Director thoughtfully allowed 3 (2000, xp, 2003) versions of outlook to be installed rather than 1. Now I need...
2
by: cj | last post by:
I have msmapi32.ocx with file date 7/23/99 2:32pm on my machine. I downloaded the one CMM referenced in his response to my post "Send To Mail Recipient" which has the file date 6/24/98 10:56am. ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.