Andrew,
>I tried sys(2333,0) in the application object's
SendEmail() method, and the method appeared not to explode with a GPF when the
SET STEP ON code was enabled (although it didn't make the note it was supposed to make). When I turned off the break though, it GPFd again - Timing problem perhaps?
Yep, these kind of errors are part of my worst nightmares, when I encounter these kind of 'timing' problems, I try to insert a DOEVENTS() after each line of code. Maybe it helps in your case.
good luck,
Walter,
>New method code:
>
>local lcSYS2333
>lcSYS2333 = sys(2333,2)
>sys(2333, 0)
>
>with this
>
> local loMessage
>
> loMessage = .oOutlook.createitem(olMailItem)
>
> loMessage.UserProperties.Add('ToContactID', olNumber)
> loMessage.UserProperties.Add('FromRep', olText)
> loMessage.UserProperties('ToContactID') = this.GetCurrentContact()
> loMessage.UserProperties('FromRep') = this.cInitials
>
> loMessage.Recipients.Add(contactview.email)
> loMessage.Recipients.ResolveAll()
> loMessage.Display(.f.)
>
>endwith
>
>sys(2333, int(val(lcSYS2333)))
>
>Cheers,
>
>Andrew
>
>>Andrew,
>>
>>>No I haven't tried sys(2333) - I'll give it a shot, but I can't see why that would make a difference, there's not an ActiveX control being instantiated within VFP - it's a COM server.
>>
>>I know, thats why it is a shot in the dark.
>>
>>>I could be displaying my lack of complete understanding of things COM, but I thought these were two different things, or at least that one was a subset of the other.
>>
>>To be honest I don't know if they are related or not, I think it's worth a try.
>>
>>>I'm also not sure where I'd switch it on/off in the code. Because it's event driven and I don't even seem to get to the start of the event code, there doesn't seem to be an appropriate place to put the sys() call.
>>
>>How about before you instantiate the com-server ?
>>
>>Walter,