Link to home
Start Free TrialLog in
Avatar of chandua
chandua

asked on

MAPI

Hi ,
when i try to close outbox without sending any mail, hit error
here is the code iam using

MAPISessEmailGOP.SignOn
MAPIMessEmailGOP.SessionID = MAPISessEmailGOP.SessionID
MAPIMessEmailGOP.Compose
MAPIMessEmailGOP.MsgSubject = "Test"
MAPIMessEmailGOP.MsgNoteText = " "
MAPIMessEmailGOP.AttachmentPosition = 0
MAPIMessEmailGOP.AttachmentType=2
MAPIMessEmailGOP.AttachmentName = ""
MAPIMessEmailGOP.AttachmentPathName = App.Path+"Test".Doc"
MAPIMessEmailGOP.Send True
MAPISessEmailGOP.SignOff

if the outlook composer is opened & closed without sending mail hit the foll error
"Run time error : 32002"
User cancelled process


Avatar of crazyman
crazyman
Flag of United Kingdom of Great Britain and Northern Ireland image

dont know whats causing your error but
MAPIMessEmailGOP.AttachmentPathName = App.Path+"Test".Doc"


should be


MAPIMessEmailGOP.AttachmentPathName = App.Path & "\Test.Doc"
Avatar of chandua
chandua

ASKER

oops.. i missed "\" in my question.. its already there.

the error hits when it reaches the foll line
MAPIMessEmailGOP.Send True
ASKER CERTIFIED SOLUTION
Avatar of daffyduck14mil
daffyduck14mil

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of chandua

ASKER

okie. i di i add in the foll code. but MAPIMessEmailGOP.Save command doesn't seems to be saving the mail in outlook drafts.    

On Error GoTo err_cmdSend_Click
''''
''''

err_cmdSend_Click:
Select Case Err.number
Case 32001
    errmsg = MsgBox("Do you want to save changes?", vbYesNoCancel + vbExclamation, "Microsoft Outlook")
    If errmsg = 6 Then
    MAPIMessEmailGOP.Save
    End If
End Select

Exit Sub
47 questions asked, only 22 closed.... ADMINISTRATION WILL BE CONTACTING YOU SHORTLY.
This question appears to have been abandoned. Your options are:
 
1. Accept a Comment As Answer (use the button next to the Expert's name).
2. Close the question if the information was not useful to you. You must tell the participants why you wish to do this, and allow for Expert response.
3. Ask Community Support to help split points between participating experts, or just comment here with details and we'll respond with the process.
4. Delete the question. Again, you must tell the other participants why you wish to do this.

For special handling needs, please post a zero point question in the link below, include the question QID/link.
https://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
 
Please click this Help Desk link for Member Guidelines, Member Agreement and the Question/Answer process:  Click you Member Profile to view your question history and keep them all current with updates as the collaboration effort continues.
https://www.experts-exchange.com/jsp/cmtyHelpDesk.jsp

To view your open questions, please click the following link(s) and update/finalize them all.

https://www.experts-exchange.com/jsp/qShow.jsp?ta=crystal&qid=20223690
https://www.experts-exchange.com/jsp/qShow.jsp?ta=crystal&qid=20265178
https://www.experts-exchange.com/jsp/qShow.jsp?ta=crystal&qid=20265195
https://www.experts-exchange.com/jsp/qShow.jsp?ta=crystal&qid=20274444
https://www.experts-exchange.com/jsp/qShow.jsp?ta=crystal&qid=20275198
https://www.experts-exchange.com/jsp/qShow.jsp?ta=crystal&qid=20180838
https://www.experts-exchange.com/jsp/qShow.jsp?ta=mssql&qid=20133711
https://www.experts-exchange.com/jsp/qShow.jsp?ta=mssql&qid=20267928
https://www.experts-exchange.com/jsp/qShow.jsp?ta=mssql&qid=20272203
https://www.experts-exchange.com/jsp/qShow.jsp?ta=mssql&qid=20268833
https://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20273717
https://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20271488
https://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20271453
https://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20266279
https://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20264617
https://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20258796
https://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20257478
https://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20255754
https://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20255748
https://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20242197
https://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20214627
https://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20193125
https://www.experts-exchange.com/jsp/qShow.jsp?ta=asp&qid=20181410
https://www.experts-exchange.com/jsp/qShow.jsp?ta=asp&qid=20148274
https://www.experts-exchange.com/jsp/qShow.jsp?ta=asp&qid=20008099

PLEASE DO NOT AWARD THE POINTS TO ME.  
 
------------>  EXPERTS:  Please leave any comments regarding this question here on closing recommendations if this item remains inactive another three days.
 
Thank you everyone.
 
Moondancer
Moderator @ Experts Exchange

P.S.  For year 2000 questions, special attention is needed to ensure the first correct response is awarded, since they are not in the comment date order, but rather in Member ID order.
Requests ignored, recent login, finalized today.
Moondancer - EE Moderator