Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CDO error

Status
Not open for further replies.

culleoka

Programmer
Joined
May 16, 2002
Messages
85
Location
US
I tried running the second script in faq184-1768 as below:

oMSG = createobject("CDO.Message")
oMSG.To = "me@nowhere.com"
oMSG.From = "me@nowhere.com"
oMSG.Subject = "This doesnt Work!"
oMSG.AddAttachment("c:\blast\ahn03i.txt")
oMSG.AddAttachment("c:\blast\ahn05i.txt")
oMSG.Send()

Yes, I used real email addresses and Outlook was open in the background when I ran it from Foxpro 5.0.

I am using Office 2000 on a Windows 2000 machine.

I get the following program error:

OLE IDispatch exception code 0 from CDO.Message.1: The "SendUsing" configuration value is invalid.

Do you have any ideas on why I get this error?

Had another person try it from VB 6 on a Win2k machine running Office 2000 also. He got the same error.

Would appreciate any suggestions you might have.

Pat McGreevy
 
culleoka

Would appreciate any suggestions you might have.

I'm able to use the above code on a XP machine with VFP5a. I thought maybe the CDO was not compatible with VFP5.0, but it doesn't appear to be the case. I may suggest to re-install the CDO (uninstall first). And make sure you end up at leats with CDO.dll CDOsys.dll.


Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Mike,
This is a fresh install of CDO and still get the error.

Have both CDO.dll and CDOsys.dll.

I am running VFP 5.0a.

Would this be a Fox config file or an Outlook config file that needs to be tweaked?

Pat
 
Would this be a Fox config file or an Outlook config file that needs to be tweaked?

No, I dont' think so since CDO uses MAPISession, not Outlook. It may be a CDO version problem. where the code I use works for Version 1.21 (file version 5.5.2654.6)
Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Thanks anyway. I will keep worrying this and post results if I can get it working.
Pat
 
I got the same error when I first did this. If your are trying to send the email out through a network or a LAN instead of just off a single machine, the CDOSYS.dll must be configured differently. You need to know the IP of the mail router and a few other parameters. I'd be happy to post the section from CDOSYS.dll help that I read on this tomorrow when I'm on my other machine that has the help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top