|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
MAPI mailon the screen for the user to send. On one pc when it creates the email if you cancel the message my program throws the error System.Runtime.InteropServices.COMException (0x800A7D01): User cancelled process at MSMAPI.MAPIMessagesClass.Send(Object vDialog) at brx729.Form1.SndMAPIMail(String subj, String msg) at brx729.Form1.MailMenuItem_Click(Object sender, EventArgs e) at System.Windows.Forms.MenuItem.OnClick(EventArgs e) at System.Windows.Forms.MenuItemData.Execute() at System.Windows.Forms.Command.Invoke() at System.Windows.Forms.Control.WmCommand(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ScrollableControl.WndProc(Message& m) at System.Windows.Forms.ContainerControl.WndProc(Message& m) at System.Windows.Forms.Form.WndProc(Message& m) at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) On my pc it doesn't show any error. I have installed the program on the network so we're using the same exe. Here's my sub that creates the email. Private Sub SndMAPIMail(ByVal subj As String, ByVal msg As String) Dim myMAPISession As New MSMAPI.MAPISession Dim myMAPIMessage As New MSMAPI.MAPIMessages myMAPISession.DownLoadMail = False myMAPISession.SignOn() myMAPISession.NewSession = True myMAPIMessage.SessionID = myMAPISession.SessionID myMAPIMessage.Compose() myMAPIMessage.MsgSubject = subj myMAPIMessage.MsgNoteText = msg myMAPIMessage.Send(True) myMAPISession.SignOff() myMAPISession.NewSession = False End Sub Any idea what is going on? Hummm, putting try catch around the sub fixed the problem, or maybe I
should say symptom. Here's the new sub. New question is why did it work? I thought after the program launched the email message it broke all ties with it. And why did it work w/o this try catch on my pc? Hummmm. Well, if I find out before anyone posts I'll post my findings. Private Sub SndMAPIMail(ByVal subj As String, ByVal msg As String) Try Dim myMAPISession As New MSMAPI.MAPISession Dim myMAPIMessage As New MSMAPI.MAPIMessages myMAPISession.DownLoadMail = False myMAPISession.SignOn() myMAPISession.NewSession = True myMAPIMessage.SessionID = myMAPISession.SessionID myMAPIMessage.Compose() myMAPIMessage.MsgSubject = subj myMAPIMessage.MsgNoteText = msg myMAPIMessage.Send(True) myMAPISession.SignOff() myMAPISession.NewSession = False Catch End Try End Sub cj wrote: Show quoteHide quote > My application, brx729, creates a new MAPI email message and leaves it > on the screen for the user to send. On one pc when it creates the email > if you cancel the message my program throws the error > > System.Runtime.InteropServices.COMException (0x800A7D01): User cancelled > process > at MSMAPI.MAPIMessagesClass.Send(Object vDialog) > at brx729.Form1.SndMAPIMail(String subj, String msg) > at brx729.Form1.MailMenuItem_Click(Object sender, EventArgs e) > at System.Windows.Forms.MenuItem.OnClick(EventArgs e) > at System.Windows.Forms.MenuItemData.Execute() > at System.Windows.Forms.Command.Invoke() > at System.Windows.Forms.Control.WmCommand(Message& m) > at System.Windows.Forms.Control.WndProc(Message& m) > at System.Windows.Forms.ScrollableControl.WndProc(Message& m) > at System.Windows.Forms.ContainerControl.WndProc(Message& m) > at System.Windows.Forms.Form.WndProc(Message& m) > at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m) > at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m) > at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, > IntPtr wparam, IntPtr lparam) > > On my pc it doesn't show any error. I have installed the program on the > network so we're using the same exe. > > Here's my sub that creates the email. > > Private Sub SndMAPIMail(ByVal subj As String, ByVal msg As String) > Dim myMAPISession As New MSMAPI.MAPISession > Dim myMAPIMessage As New MSMAPI.MAPIMessages > > myMAPISession.DownLoadMail = False > myMAPISession.SignOn() > myMAPISession.NewSession = True > > myMAPIMessage.SessionID = myMAPISession.SessionID > > myMAPIMessage.Compose() > > myMAPIMessage.MsgSubject = subj > myMAPIMessage.MsgNoteText = msg > > myMAPIMessage.Send(True) > myMAPISession.SignOff() > myMAPISession.NewSession = False > End Sub > > > Any idea what is going on? Hi,
Thank you posting! Based on the error message, the exception is thrown from the underlying MAPI DLL, your VB.NET code seems all right. In this regard, I think you can consult this issue in our MAPI specific newsgroup, you may get some different ideas there: microsoft.public.platformsdk.mapi Thanks for your understanding. Best regards, Gary Chang Microsoft Online Community Support ================================================== When responding to posts, please "Reply to Group" via your newsreader so that others may learn and benefit from your issue. ================================================== This posting is provided "AS IS" with no warranties, and confers no rights. Thanks, I didn't know about the mapi newsgroup. I'll ask there.
Gary Chang[MSFT] wrote: Show quoteHide quote > Hi, > > Thank you posting! > > Based on the error message, the exception is thrown from the underlying > MAPI DLL, your VB.NET code seems all right. In this regard, I think you can > consult this issue in our MAPI specific newsgroup, you may get some > different ideas there: > > microsoft.public.platformsdk.mapi > > Thanks for your understanding. > Best regards, > > Gary Chang > Microsoft Online Community Support > ================================================== > When responding to posts, please "Reply to Group" via your newsreader so > that others may learn and benefit from your issue. > ================================================== > This posting is provided "AS IS" with no warranties, and confers no rights. > You are welcome. :)
Good Luck! Best regards, Gary Chang Microsoft Online Community Support ================================================== When responding to posts, please "Reply to Group" via your newsreader so that others may learn and benefit from your issue. ================================================== This posting is provided "AS IS" with no warranties, and confers no rights.
DataView RowFiltering
Create DB Example - It works, but is it right? Cannot insert explict value for identity column in table 'Employees' when IDENTITY_INSERT is set to XML From Stored Proc Access locking and transactions How to serialize into a string ? Web Browser & Navigating to pages with errors Referring to form objects from inside a thread pool locate a desired row Conversion of PNG to HTML Files |
|||||||||||||||||||||||