I use this code to send email from my application :
- Code: Select all Expand view
oOutLook := CreateObject("Outlook.Application")
oMail := oOutLook:CreateItem(olMailItem)
oMail:Subject := ALLTRIM(EmOnde)
oMail:Body := ALLTRIM(FmText)
oMail:Recipients:Add(cEmail[i])
oMail:CC := TabCC
oMail:BCC := TabBCC
FOR j=1 TO LEN(TabBijl)
oMail:Attachments:Add(TabBijl[j])
NEXT
oMail:HTMLBody := MEMOREAD(ALLTRIM(US->UOUTLSJAB))
oMail:Send()
When I was using Outlook 2000, XP or 2003, everything went just fine. Now I just started using Outlook 2007. If Outlook 2007 is opened, no problems occurs but if Outlook 2007 is not opened, I got an error :
Error discription : E_FAIL:Recepients
Win32ole => TOLEAUTO:RECIPIENTS
To prevent the error from happening, I have to open Outlook 2007 before I run my application.
But this wasn't the case with Outlook 2000, XP or 2003. I didn't need to open Outlook before running my application.
Can anyone tell me how this problem can be solved ?
Thank you.