>>>What could be my problem?
>>>Do I need to initialize something, or release a variable pointing to Outlook object? What could I be missing?
>>
>>Have you set every object variable to NULL after the first email? That works for me...
>
>
>I am now using the following code to test with Outlook 97.
>
>
>THISFORM.oMail = CreateObject("Outlook.Application")
>oEmailItem = THISFORM.oMail.CreateItem(0)
>
>oEmailItem.To = "ericg@dgcsolutions.qc.ca"
>oEmailItem.Subject = "Subject"
>oEmailItem.Importance = 1
>oEmailItem.Body = "body text"
>oEmailItem.Send
>
>oEmailItem = null
>THISFORM.oMail = null
>
That looks thorough. As a test, could you put two buttons on a form each with same code, try one, then the other, back and forth a few times, see what happens?
Also, one thing that's changed a couple times is the Send function. I've had to alter my Send to include parameters (first) or different parms (later) at least twice since I've upgraded Outlook versions. Could be related, possibly...
The Anonymous Bureaucrat,
and frankly, quite content not to be
a member of either major US political party.