Using CDO for email

imaquila

Board Regular
Joined
Feb 4, 2012
Messages
86
I've found an example of the code but it triggers an error. "The "SendUsing" configuration value is invalid."
Since I did a copy and paste of the code changing on the the variable for the address to send to. I'm guessing that I do not have something installed which is needed to use CDO. I found and selected "Microsoft CDO for Win 2000" from my reference library (I have Win 7 but I thought it might work) but I got the same error. Maybe I need a line of code to link my project to the reference library. I'm not sure.

If I do need something else to use CDO what would it be?

My thanks to anyone who can help.
 
Last edited:
I searched my system files and I do have mapi.dlls in both my system32 and 64 folders but I suspect one needs more than just the dll to use mapi.

As I mentioned before. I didn't bother changing the email addresses since the code has never executed far enough to "send" anyway. I did change the SMTP address even though the code is never used that far either. If you have the time, I'd be VERY interested in knowing what error you get when the email address doesn't match the smtp server. It may trigger an error but my guess would not be a "Class not registered" error.

I looked closer at Thunderbird and found that it was a very old version (something like 6). Just to cover all my bases, I downloaded the current version (11) but it made no difference to the CDO execution.

I'm part of a group of artists participating in an art show and my job is to track what and for how much each artist sells at the show because we have a central checkout system and need to settle up after the end of the show. I've set up an autofilter in Excel to display each item sold by a given sales person. That being said, I can send out sales reports which are acurate only to about 12 items because I've discovered there's a limit of about 1024 characters that can be used in the variable for the message body using the ShellExecute method. Anything longer that that is abruptly truncated even in the middle of a record. The good news is that because it uses my default email app there's no need to program server addresses, ports, usernames, passwords etc. The bad news is that in addition to the limitation in the size of the message body, ShellExecute can't handle attachments. Those were the reasons that I was exploring the CDO option.

From what I've read there have been a lot of problems with Win 7 and MAPI I've found a number of people with the same issue of "Class not Found" but no definative answers as to the cause. My guess is that some lingering remnant(s) of an Outlook Express installation is crucial to the success or failue of CDO and since win7 did not come with Outlook Express, it is missing that element(s).

Thanks a lot for trying but I think I'm going to have to throw in the towel on the CDO idea. I've included total gross sales information in my email sales reports and I'll just have to print out the item lists rather than email them for those with more than a dozen items sold.
 
Upvote 0

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Well, I actually can send emails with any names in the from or to - but this depends on the server. For instance, smtp.frontier.com rejected my request because of an authentication error - or you may have seen the emails you've been trying to send for the last five days today.

It appears that some email clients "register" the fields you need. Apparently not Thunderbird. A fix may be to download outlook express even if you don't use it as your default client. Beyond that, I'm out of ideas too.

It was worth a try - I suspect there's some way to do this but I'm not going to solve it today.

ξ
 
Upvote 0

Forum statistics

Threads
1,223,238
Messages
6,170,939
Members
452,368
Latest member
jayp2104

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top