Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
MAPISession and MAPIMessage
Message
From
13/05/1998 12:28:21
 
 
To
13/05/1998 10:34:11
John Vlahos
V I Software Solutions Design
Mississauga, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00099035
Message ID:
00099092
Views:
22
John

Use Send(1) or Send(.F.) I am not sure instead of Send().
This was added to vfp 5a.

Mo

>Hi,
>
>This is a routine I have is stored the Init event of a form. I have the Microsoft MAPI Session and Message Control dropped on my form. I named the Session object OLESessionMAPI and the Message object OLEMessageMAPI.
>
>The following routine is supposed to attach a file named "Ca000001.txt" located in the "C:\Email" directory, and send it out to an internet recipient, "vlahosj@total.net".
>
>Can anyone tell me why this code is failing at run time at the
>".Send()" event? Has anyone else had problems getting the MAPI Activex to work?
>
>The error message I get is "OLE error code 0x80020010:Invalid callee.".
>
>I've tried this on several workstations, all with internet connections using MS-Exchange with the proper 32-bit MAPI DLLs installed.
>
>NOTE: The user name and password are not the reall ones.
>
>>
>
>ThisForm.OLESessionMAPI
> .LogonUI=.F.
> .NewSession=.F.
> .Username="TestUsername"
> .Password="TestPassword"
>
> .SignOn()
>ENDWITH
>
>WITH ThisForm.OLEMessageMAPI
> .SessionID = ThisForm.OLESessionMAPI.SessionID
> .Compose()
>
> .MsgType = ""
> .MsgSubject = "CAMPAIGN FILES"
> .MsgNoteText = "Here it is..."
>
> .AttachmentIndex = .AttachmentCount + 1
> .AttachmentName = "Ca000001.txt"
> .AttachmentPathName = "C:\Email\Ca000001.txt"
> .AttachmentPosition = 12
> .AttachmentType = 0
>
> .RecipIndex = .RecipCount + 1
> .RecipAddress = "vlahosj@total.net"
> .RecipDisplayName = "John Vlahos"
> .RecipType=1
>
> .Send()
>ENDWITH
>
>ThisForm.OLESessionMAPI.SignOff
>ThisForm.Release()
>
><
>
>Thank you,
>John Vlahos
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform