Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What's Wrong With This Code???
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
What's Wrong With This Code???
Miscellaneous
Thread ID:
00433823
Message ID:
00433823
Views:
48


I am trying this MAPI example I got somewhere. On the line right before the Send(), I get the errorOLE Dispatch error:

"Valid Session ID Does Not Exist"





  cRecipient = "someone@somewhere.com"
  cSubject = "This is the subject"
  cMsgText = "This is the body"

  oForm = CREATEOBJECT("Form")

  WITH oForm

   .AddObject("Session1", "OleControl", "MSMAPI.MAPISession")
   .AddObject("Message1", "OleControl", "MSMAPI.MAPIMessages")

    WITH .Message1
     .MsgIndex = -1
     .RecipDisplayName = cRecipient
     .MsgSubject = cSubject
     .MsgNoteText = cMsgText
     .SessionId = oForm.Session1.SessionId
     .Send()
    ENDWITH

   .Session1.SignOff()

  ENDWITH




Anyone know whats wrong here? Also, can I do this without creating a form?
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Next
Reply
Map
View

Click here to load this message in the networking platform