Hi. I'm running win 10 (updated to most recent).
I've recently rebuilt my computer and have reinstalled Access 2007 and a split database. In the front-end there is a script to email a message to multiple recipients. I select the recipients from a list and click a "send" button, intending to send it as an email in Thunderbird. I'm using the standard Sendobject code.
It used to work and now doesn't. The same database is used on another computer (both front-end and back-end are on a cloud drive) without problems. I get the message:
"Runtime error 2046:
The command or action SendObject isn't available now."
I have spent days looking for a solution.
Can anyone help?
Thanks in advance.
Full code of subroutine follows. Note that in the following there is a function called ConcatRelated. It works to create a string of email recipients. It definitely works: - Private Sub Command76_Click()
-
'Check for empty Subject line
-
If IsNull(Text89) Then
-
MsgBox "Please enter some text for the SUBJECT.", vbOKOnly, "Error"
-
Text89.SetFocus
-
Exit Sub
-
End If
-
'Check for empty text
-
If IsNull(Text73) Then
-
MsgBox "Please enter some text for the MESSAGE.", vbOKOnly, "Error"
-
Text73.SetFocus
-
Exit Sub
-
End If
-
-
'Determine the recipients to be sent an email
-
Dim varItem As Variant
-
Dim recipients As String
-
'Determine if at least one course has been selected
-
If List77.ItemsSelected.Count = 0 Then
-
MsgBox "Please select at least one course", vbOKOnly, "Error"
-
Exit Sub
-
End If
-
'Collect email addresses of the recipients
-
recipients = ""
-
-
Lc = List77.ListCount
-
-
'If "ALL" is selected, then select all courses
-
If List77.Selected(1) Then
-
Dim i As Integer
-
For i = 0 To List77.ListCount - 1
-
List77.Selected(i) = True
-
Next i
-
End If
-
-
'loop through all selected courses
-
Dim z As Long
-
With List77
-
-
For z = 2 To Lc
-
If List77.Selected(z) Then
-
If Check81 Then recipients = ConcatRelated("Invoicemail", "BulkEmail", "[coursekey]= """ & .ItemData(z) & """", , ";") & recipients 'Email invoicees
-
If Check79 Then recipients = ConcatRelated("StudentEmail", "BulkEmail", "[coursekey]= """ & .ItemData(z) & """", , ";") & recipients 'Email Students
-
End If
-
Next z
-
End With
-
-
'remove duplicates
-
recipients = EliminateDupesInString(recipients, ";")
-
' Calculate number of email addresses
-
If recipients <> "" Then x = Len(recipients) - Len(Replace(recipients, ";", ""))
-
MsgBox "There are " & Str(x) & " addresses."
-
-
If recipients <> "" Then DoCmd.SendObject acSendNoObject, , acFormatRTF, "office@xxx.com", , recipients, Text89, Text73, True
-
DoCmd.Close
-
End Sub
33 10728 NeoPa 32,568
Recognized Expert Moderator MVP
Have you tried to Dubug ( Debugging in VBA) this code and seen what each variable holds at the time you get the error (Line #54) in your code?
Hi NeoPa,
Thanks for answering. Yes, I have and everything checks out. The error appears only when the SendObject is attempted. All variables are valid. Also, it works on another machine, and also worked seamlessly prior to the rebuild.
I remember having this issue about 1 year ago and I found a solution, but have no idea what it was. How silly that I didn’t record the solution.
ACB
Hi ACB64,
Doesn't SendObject negotiate with the default mail client? That would suggest that the problem seems to be outside of your Access solution. I do not use Thunderbird, but is there a setting for enabling this kind of automation?
Gaz
Hi Gaz,
Yes, that’s my understanding, and exactly the reason for my problem. Previously, I had no problems with SendObject negotiating with Thunderbird. Now, however, after the rebuild, something is presumably different and I don’t know what it is.
Andrew.
Hi Mycinegisters,
Any hints??? I checked out your blogs and didn’t find anything that looked related to my issue.
Andrew.
Hi ACB64,
In Windows itself, when you right click a file and select Send To... Mail recipient does Thunderbird respond properly?
Is Thunderbird defined as the default mail handler in PC Settings -> Default apps?
Is the build of Thunderbird the same on your machine and the working machine, and are you able to directly compare settings?
Gaz
Hi ACB64,
In addition to my prior questions I also meant to ask if both Office and Thunderbird are targetting the same architecture (x86 / x64)?
Gaz
Hi Gaz,
Thanks for responding so quickly.
Yes, TB is the default email client in Windows.
Yes, the machine computer aus running TB 32 Bit and Access 2007 only had the 32 Bit architecture. I tried running the 64 Bit version of TB, but got the same problem. Then I went back to the 32 Bit Version of TB. The two machines are similar except the „working“machin e is running office 2013 and the corresponding version of Outlook. I even tried installing the Access 2013 runtime and ran the DB with that. No help. The problem was still there. I uninstalled the runtime. Apart from that, I can no differences. However, as stated previously, the “non working” machine used to work and the build is, as far as I can tell, the same a as before (Win 10, access 2007, TB, etc.)
Andrew.
Hi Andrew,
Did the right click file -> Send To -> Mail recipient test work?
I assume the machine has been restarted since the reinstallation of Thunderbird? Shutdown / cold boot does not count (Win 10 fast boot shenanigans).
Gaz
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Paul Lamonby |
last post by:
Hi,
I am sending a file from the server as an email attachment. The file
is being attached no problem and sending the email, but I get an error
when I try to open it saying it is corrupt. Obviuosly, the file is
fine on the server, so the attachment code I am using must be
corrupting it, but I dont know what it is:
// send email with attachment
function emailAttachment($to, $subject, $message, $name, $email,
|
by: dave |
last post by:
hi guys
I m trying to execute few lines code tht i have copies
from microsoft tech script centre.
basically its to send email without using any smtp
service. u can find the code snippet from following link.
http://www.microsoft.com/technet/community/scriptcenter/en
tscr/scrent16.mspx
while executing this code in vbs file i was getting error:
|
by: jdph40 |
last post by:
I'm using Access 97. In the OnClick event of a button I have the code
below. I looks at txtEmail and sends an e-mail message without
further action from the user (user does not have to click Send as he
would if he used DoCmd.SendObject.) However, I want to attach a
report in Snapshot format. How would I modify my code to include a
report?
Thank you,
JD
|
by: Eddy |
last post by:
We use Thunderbird as E-Mail client.
When sending a report from MsAccess 2003 running under Windows XP, the
attachment is a xxxx.tmp file instead of the required docname.rtf file.
I do not have this particular problem when running under windows2003 server.
The Windows Knowledge base only states this example when using Lotus
Notes as e-mail client. The temp directory is empty.
Anyone ideas?
DoCmd.SendObject acReport, "" & stDocName &...
|
by: Nick Gilbert |
last post by:
Hi,
I'm writing a Windows Forms application in .NET and I need to send an
e-mail from it. As it's NOT asp.net, I don't have access to an SMTP
server so I will have to send the e-mail using Simple MAPI.
I can't seem to find a way of doing this in .NET as it seems .NET has no
MAPI support (amazingly!).
How can I reliably send an e-mail from a Windows Forms app from .NET?
| |
by: J-P-W |
last post by:
I have some code, from this group (many thanks) that sends an
attachment to an email.
The following:
Dim objNewMail As Outlook.MailItem
Dim golApp As Outlook.Application
Dim initializeOutlook As Boolean
requires Microsoft Outlook xx Object Library in the references.
|
by: brendan_gallagher_2001 |
last post by:
Hi,
Does anyone know how to create an attachment using a stream in classic
ASP.
I can see that it can be done in ASP.Net as per the article below:
Initializes a new instance of the Attachment class with the specified
stream and name.
http://msdn2.microsoft.com/en-us/library/6sdktyws.aspx.
|
by: clloyd |
last post by:
I have an event that creates and email that works perfect however, now I want the code to find a file on our server and insert it as an attachment. I really want to use a pdf version but here is an example of the code calling for a Word document.
The code to call the document is:
stDocName = "S:\Misc\Policy\What to have prepared for audit.doc"
|
by: phill86 |
last post by:
Hi
I am using the following code to send an email from access via outlook automatically
DoCmd.SendObject acSendReport, stDocName, acFormatRTF, "User", , , , , False
|
by: imahhua |
last post by:
I am not a programmer and I usually use macro to fulfill some small functions.
This time I use a Macro of "SendObject" to send report as Pdf format.
it is working well when I test it while "Navigation Pane" is displayed. But after I hide the "Navigation Pane", the problem appears:
If I cancel emailing by click "X" of outlook 2007 window,The system crashes. Access can not even be closed. The dialogue window shows"You can not exit Microsoft...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |