473,320 Members | 1,863 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Can't open mailsession... No *real* solution ??

Hi all,

I asked the same question two days ago. Only answer (from Lyle) was a CDO-workaround.
I Googled and Googled for answers and I see again that I am not the only one struggling with this issue.
Lots of hits yes, but lots and lots of these questions with no answer at all...
One 'final' solution is about deleting a regkey, that also in my case does not exist...

Question again:
While trying to send mail from Access a client sees the message:
"Microsoft Access can't open the mail session. Check your mail application ...."
I *know* this message as I had the *very same* message when using Access 97 while Access2000 was installed too.
The 'solution' for me has been to use Access2000, and... no problemo anymore.

BUT this client *is* using Access2000 with XP Pro on a fresh PC.
I just installed her PC again from scratch two weeks ago because she had a very destructive virus.
I installed Office2k and only a few other programs.

I know this question has been asked a *lot* but there are only a few answers given...
MS covers this message with kb Q283173 (problem with Access 97 and 2000)
http://support.microsoft.com/default...b;en-us;283173
But the regkey is NOT present on the client's PC.

Anybody has found a *real* solution for this ??
I really would like to *solve* this. (I know there are workarounds)

Thanks.
Arno R
Feb 21 '07 #1
1 1843
On Feb 21, 5:20 am, "Arno R" <arraNOcomS...@tiscali.nlwrote:
Anybody has found a *real* solution for this ??
I really would like to *solve* this. (I know there are workarounds)
I offer these only because I think you may have advanced to the "try
anything" state.

1. Many years ago we (CDMA regulars) indentified that SendObject did
not work unless there is a (child) window visible in the Access
application window. That is, if we hide (not minimize) the database
window, and do not open any forms or reports, SendObject fails. But
the error message is not your error message. It's one in a hundred
that this might have something to do with you problem.

2. TTBOMK SendObject and all "sends" from Access depends upon MAPI and
its proper configuration. This code relies on mapi to open a draft
message in the default MAPI handler. I'm not suggesting this as a
workaround but it might be useful as a diagnostic. Perhaps you could
use it to ascertain that MAPI is OK on the client's computer, and what
the default handler for eml files is. This one's one in a thousand!

Private Declare Function ShellExecute& Lib "shell32.dll" _
Alias "ShellExecuteA" _
( _
ByVal Window&, _
ByVal Operation$, _
ByVal File$, _
ByVal Parameters$, _
ByVal Directory$, _
ByVal Show&)

Public Sub Draft( _
ByVal from$, _
ByVal recipients$, _
ByVal subject$, _
ByVal body$, _
Optional ByVal cc$, _
Optional ByVal bcc$, _
Optional ByVal priority&)

Dim buffer$
Dim filenumber%
Dim filename$
Dim path$

On Error GoTo DraftErr:

buffer = "From:" & Chr(34) & from & Chr(34)
buffer = buffer & vbNewLine & "To:" & Chr(34) & recipients & Chr(34)
If Len(cc) 0 Then _
buffer = buffer & vbNewLine & "CC:" & Chr(34) & cc & Chr(34)
If Len(bcc) 0 Then _
buffer = buffer & vbNewLine & "BCC:" & Chr(34) & bcc & Chr(34)
buffer = buffer & vbNewLine & "Subject:" & Chr(34) & subject & Chr(34)
If priority < 1 Or priority 3 Then _
priority = 3
buffer = buffer & vbNewLine & "X_priority:" & priority
buffer = buffer & vbNewLine & "X_Unsent: 1"
buffer = buffer & vbNewLine
buffer = buffer & vbNewLine & body

path = Environ("temp")
filename = path & "\temp.eml"
' I doubt this line is necessary
' in VBA but it may be
' in languages where "\"
' is a literal precursor
filename = Replace(filename, "\", "/")

On Error Resume Next
Kill filename
On Error GoTo DraftErr:

filenumber = FreeFile()
Open filename For Binary As #filenumber
Put #filenumber, , buffer
Close #filenumber

ShellExecute 0, "Open", "file://" & filename, "", "", 0

DraftExit:
Close
Exit Sub

DraftErr:
With Err
MsgBox "Error Number " & .Number & vbNewLine & .Description, _
vbCritical, "Draft Creation Failed"
End With
Resume DraftExit
End Sub

Sub testDraft()
Draft "so*****@whatever.com", "so*****@domain.com", _
"Draft", "This is a test."
End Sub

Feb 21 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Nicola Pedrozzi | last post by:
Here I really need a guru... ;^( I found out today with a big disappointment that : window.open("url", ...) and also navigate("url") limit the max length of the url string to something...
22
by: The Road To Utopia | last post by:
Here's one for the trolls...a common jibe from them is setting up audio/video hardware under linux. Ok, true story: at work today, someone asked me if I could tell him why his XP Home would play...
3
by: Gérard Talbot | last post by:
Hello all, When webfonts are used for purely cosmetic/ornemental reasons and on a large scale, I don't agree. When webfonts are used because Unicode support among browsers for a particular...
17
by: Jon Ole Hedne | last post by:
I have worked on this problem some hours now (read many-many...), and I can't solve it: In vba-code I create a table with Connection.Execute, and add some data to it. This table is saved in the...
5
by: Jerry Hull | last post by:
I'm working with a database developed by an untrained person over several years - and on a network that has recently been upgraded with a new server installed and MS office upgraded from 2K (I...
4
by: Arno R | last post by:
Hi all, In the past I have had this issue with sendobject not working with A97. Often it was related to more Access versions installed. IME SendObject would only work with the latest version. ...
26
by: Bill Reid | last post by:
Bear with me, as I am not a "professional" programmer, but I was working on part of program that reads parts of four text files into a buffer which I re-allocate the size as I read each file. I...
2
by: Arno R | last post by:
Hi, A client just called me this afternoon and said she had a problem. While trying to send mail from Access she sees the message: "Microsoft Access can't open the mail session. Check your mail...
65
by: Chris Carlen | last post by:
Hi: From what I've read of OOP, I don't get it. I have also found some articles profoundly critical of OOP. I tend to relate to these articles. However, those articles were no more objective...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.