Solved

Docmd.SendObject not working

Posted on 2007-11-23
13
1,145 Views
Last Modified: 2012-08-13
When I tried this code line in the Immediate Pane:

docmd.SendObject acSendNoObject,,,"Ray Learmond",,,"A Little Test","This is a test"

I get the error message Runtime Error 2046 - blah, blah.

I tried to unregister and register Mapi32.dll and I got this message:

C:\Windows\System32\Mapi32.dll was loaded, but the DllRegisterServer entry point was not found.  The file cannot be registered.

I use Outlook for Email and Firefox as my browser running on XP Home with SP3
0
Comment
Question by:GRayL
  • 6
  • 4
  • 3
13 Comments
 
LVL 65

Expert Comment

by:rockiroads
ID: 20340818
Hi Ray

This this code use to work before?

Whats your default email client set as?

If you specified a valid email address rather than outlook name, does it make a difference?

Regarding mapi, I dont think you can register that manually. Its installed/registered when you install outlook/exchange wherever its in.
0
 
LVL 44

Author Comment

by:GRayL
ID: 20340870
Hi rocki:

I believe so

Outlook 2000

No

Email with Outlook is working well.  I was troubleshooting an EE problem and tried to send an Email from Access and to my surprise...
0
 
LVL 65

Expert Comment

by:rockiroads
ID: 20340908
I tried your exact line and it worked fine

have you tried different variations of send object, perhaps send results of a query, fill in output type etc - just for experimenting.
If a full valid line fails then a bigger problem!!!

Just out of interest, does outlook and cdo automation work?
0
 
LVL 65

Expert Comment

by:rockiroads
ID: 20340918
Just as a test, cos you know how flaky Access is, have u tried a compact/repair - usual checks for corruptness. Probably not that, but its one check I always do to rule out things
0
 
LVL 65

Accepted Solution

by:
rockiroads earned 250 total points
ID: 20340923
Another thing, you do have all the latest service packs, right? both for office and windows,  but more importantly for office
0
 
LVL 74

Assisted Solution

by:Jeffrey Coachman
Jeffrey Coachman earned 250 total points
ID: 20341353
GRayL,

I, like rockiroads, could not duplicate your issue.

Here is what I tried:
DoCmd.SendObject acSendNoObject, , , "ALFKI.ALFKI@ALKI.net", , , "A Little Test", "This is a test" 'Using Full Email address as recipient
DoCmd.SendObject , , , "ALFKI.ALFKI@ALKI.net", , , "A Little Test2", "This is a test2" 'Not using the default "acSendNoObject"
DoCmd.SendObject acSendNoObject, , , "ALFKI ALFKI", , , "A Little Test3", "This is a test3" 'Using the Oulook Alias as the recipient
DoCmd.SendObject acSendNoObject, , , "ALFKI.ALFKI@ALKI.net", , , "A Little Test4", "This is a test4" 'Database window hidden, ref.:http://support.microsoft.com/kb/q244695/

All 4 worked fine.

I know you are using Off 2k.
This is 2003 specific, but who knows?
http://support.microsoft.com/kb/834008


Jeff
0
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 
LVL 44

Author Comment

by:GRayL
ID: 20346624
Strange.  I can open Word, click on the Send Email icon in the tool bar, up pops the Mail format, type in Ray Learmond, subject - A Short Test, body - A short test from Word, append a photo and click send.  20 seconds later, there's my Email.  Yet Access cannot find Outlook, which is my Email application using docmd.sendobject.
0
 
LVL 44

Author Comment

by:GRayL
ID: 20346805
Also discovered there are two versions of mapi32.dll on the machine at??

C:\Windows\System32\mapi32.dll   -   ver 1.0.2536.0

C:\Program Files\Common Files\System\Mapi\1033\NT\Mapi32.dll    -   ver 1.0.2518.0
Under Comments in Properties - Service Pack 2





0
 
LVL 44

Author Comment

by:GRayL
ID: 20654279
docmd.SendObject acSendNoObject,,,"Ray Learmond",,,"A Short Test","This is a docmd.sendobject test from Access",False

I ran this code line from the Immediate Pane and it is now working just fine.  BTW I am using Firefox as my browser, and after my last auto-update from MS, I decided to give it another whirl, and presto.

Boag and rocki - I'm splitting the points, thanks.
0
 
LVL 44

Author Closing Comment

by:GRayL
ID: 31410699
Thanks again.  Sometimes the sleeping dogs must lay for a while;-)
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 20660827
GRayL,

Hey!

Happy New year!
:)

<docmd.SendObject acSendNoObject,,,"Ray Learmond",,,"A Short Test","This is a docmd.sendobject test from Access",False>

... so just setting the "Edit message " parameter to: "False" fixed it?

JeffCoachman

0
 
LVL 44

Author Comment

by:GRayL
ID: 20665722
Jeff:  Not sure.  As I said, I had an auto-update run a few days ago, I then I checked my open questions, found this one, decided to 'try it one more time' - and it worked,  both with and without the 'Edit message' parameter set.  Who knows??  Happy New Year!

Ray
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 20669276
;)
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The biggest nightmare for any Exchange Server Administrator is to keep the server running without any issue. But the problems often come and they need to be resolved efficiently and timely. Here are important troubleshooting points: Define the Pr…
We are happy to announce a brand new addition to our line of acclaimed email signature management products – CodeTwo Email Signatures for Office 365.
In this Experts Exchange video Micro Tutorial, I'm going to show how small business owners who use Google Apps can save money by setting up what is called a catch-all email address in their Gmail accounts. By using the catch-all feature, small busin…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now