>Periodically I get the error "member RECIPIENTS does not evaluate to an object". Below is the code that generates the error.
>
>
>
> oOUTLOOK= Createobject('outlook.application')
> omail=oOUTLOOK.createitem(0)
> omail.recipients.Add('beth@workerscomp.com')
>
>
>
>The same code has worked for several year - the email address is an internal url. We send out hundreds of emails daily and occassionally that error message pop up.
>
>Anyone else get this error message or knows what it means? Any way to get around it?
My experience is that automating Outlook is always smoother is you instantiate the MAPI namespace after creating the Outlook object:
oNS = oOutlook.GetNameSpace("MAPI")
Try adding this line and see if it makes the problem go away.