Solved

Cannot Send Object at this time; trying to send email

Posted on 2008-09-30
16
300 Views
Last Modified: 2013-12-17
I have code that send email using DoCmd.SendObject that works on one computer but not on another.  I get error Cannot Send Object at this time.  MSAccess librarys appear to be the same and both use Outlook Express.
0
Comment
Question by:PJEOD
[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
  • 8
  • 8
16 Comments
 
LVL 84
ID: 22604968
Can you show the code you're using?
0
 

Author Comment

by:PJEOD
ID: 22607430
   DoCmd.SendObject acSendNoObject, , acFormatTXT, _
        Me.ThisEmailAddr, , _
        "staff@Endry.Org", _
        Me.ThisSubject, _
        Me.ThisMessage & vbCrLf & Me.ThisTrailer, True
0
 
LVL 84
ID: 22609633
Try removing the acFormatTXT ...
0
Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

 

Author Comment

by:PJEOD
ID: 22610083
i left the field empty, still doesn't work getting error
2046 The command or action Send Object isn't available now

This sendobject function works on another computer without error, just not on the one I need it on.
0
 

Author Comment

by:PJEOD
ID: 22614639
Anybody with any ideas on this?  Its not related to Admin status or VBasic coding
0
 
LVL 84
ID: 22614806
Are you using this in a Loop? SendObject is known to fail in 2000 when used in a loop.
0
 

Author Comment

by:PJEOD
ID: 22615771
Good question - but No.  Staffer clicks on command button to send email and it goes to Docmd.sendobject.  
0
 

Author Comment

by:PJEOD
ID: 22616001
How about if I install Mozilla?  will Docmd.Sendobject run Mozilla instead of OE?  Will I have to uninstall OE first or make Mozilla primary somehow?
0
 
LVL 84
ID: 22617080
SendObject works with whatever is the default mail client.

Try this instead of SendObject:

    Application.FollowHyperlink "mailto:" & Me.ThisEmailAddr & "?subject=" & Me.ThisSubject & "&body=" & Replace(Me.ThisMessage & vbCrLf & Me.ThisTrailer, "&", "%26")

I've had odd instances where I had to use this construct in order to make this work.
0
 

Author Comment

by:PJEOD
ID: 22619444
YES! It works!  However, it the new mail message it opens doesn't use the signature, which is contains our logo, address, hours, etc.  Normally when we start a new message from OE it has this at the bottom.  Any ideas?
0
 
LVL 84
ID: 22619538
I don't think you'll be able to use the signature ... but I'm not sure. The Followhyperlink method is a failsafe method, and you can't really automate it too much.

You could try automating Outlook Express with this 3rd party control:
http://www.efextra.com/oelib.htm

Or just use vbSendMail:
www.freevbcode.com/ShowCode.Asp?ID=109
0
 

Author Comment

by:PJEOD
ID: 22662885
Followhyperlink will not send office hours, address, disclaimer that we'd like to send at bottom of email; can't even get it to send vbCrLf.  One of the links gives "page not found" error and the other is over my head.  I would really just like the one computer to accept the SendObject like my other computer.  Are there unset options that might explain it?  Both are Admin users, same version and dll files in Office Express.  
0
 
LVL 84
ID: 22663361
Outlook Express really isn't "automatable" ... in other words, while there are some workarounds, they're flaky (at best) and are prone to issues. This is why I suggested you look into vbSendMail, but if it's too complex then you may want to stick with other methods.

The SendObject command in Access relies entirely on the default email client on your machine. If your code works on MachineA, which is setup exactly like MachineB, but your code does NOT work on MachineB then you have some issues on MachineB which need to be addressed. These aren't Access issues, but almost certainly are issues with your email client. Have you made sure that your email client is fully up to date? What about Office, Windows, etc etc ...
0
 
LVL 84
ID: 22663381
Also: If you want a full-featured, easily handled email solution then SendObject is most definitely not the path to take. I use the Internet Mail Library from Codestone (www.codestone.co.uk) with very good results, but there are plenty of other 3rd party controls you can use as well.

0
 

Accepted Solution

by:
PJEOD earned 0 total points
ID: 22724000
I looked at these 3rd party options - they do attachments but not signatures.  I found another computer that didn't give me the SendObject error and moved the program to that one instead
0
 
LVL 84
ID: 22739055
The third party options most certainly do signatures, they just don't use the same sig you use in Outlook or OE, since those are specific to the program. You just use the HTML format and add your own signature.

Thanks for the 0 points ... I enjoy using up my time on this ALL VOLUNTEER forum with questions like this ... good luck with future questions, you'll get no further assistance from me.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
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…

734 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