• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1226
  • Last Modified:

Docmd.SendObject not working

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
GRayL
Asked:
GRayL
  • 6
  • 4
  • 3
2 Solutions
 
rockiroadsCommented:
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
 
GRayLAuthor Commented:
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
 
rockiroadsCommented:
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
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
rockiroadsCommented:
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
 
rockiroadsCommented:
Another thing, you do have all the latest service packs, right? both for office and windows,  but more importantly for office
0
 
Jeffrey CoachmanMIS LiasonCommented:
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
 
GRayLAuthor Commented:
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
 
GRayLAuthor Commented:
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
 
GRayLAuthor Commented:
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
 
GRayLAuthor Commented:
Thanks again.  Sometimes the sleeping dogs must lay for a while;-)
0
 
Jeffrey CoachmanMIS LiasonCommented:
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
 
GRayLAuthor Commented:
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
 
Jeffrey CoachmanMIS LiasonCommented:
;)
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

  • 6
  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now