?
Solved

Docmd.SendObject not working

Posted on 2007-11-23
13
Medium Priority
?
1,200 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
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 1000 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 1000 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
 
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Suggested Courses
Course of the Month10 days, 12 hours left to enroll

765 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