"
Sub SENDMail(stAddress As String)
Dim stMailTo As String
On Error GoTo Email_ERR
If Len(stAddress) = 0 Then
If FumDom("Missing e_Mail address, do you want to input it
now?", , , "EMAIL ADDRESS!!") = MsgResCancel Then Exit Sub
stAddress = InputBox("INPUT EMAIL ADDRESS")
If Len(stAddress) = 0 Then Exit Sub
End If
stMailTo = "Mailto:" & stAddress
Call ShellExecute(0, "open", stMailTo, vbNullString, vbNullString,
1)
EMAIL_Out:
Exit Sub
Email_ERR:
fumERR 0, "SEND MAIL", Err.Number, Err.Description
Resume EMAIL_Out
End Sub
"
This Sub executes the default mail client (Outlook Express) and
generates and displays an empty message using the Users's default mail
account and the related signature. The signature contains the
Company’s Logo, the user’s name aand coordinates (Phone, Cell Phone,
email address, etc). The user writes the message body, attaches files
and hits the send button.
There are other functions that allow a user to generate a pdf document
from an Access Report and automatically attach it to an email message.
For this I use PDF995 software. In this case also the mail message is
sent using the user's default Outlook Express account.
This means that each user must chose one among 5 different usernames
when he logs in to the application, each user name being associated to
a different company and the related email address.
Since there are about 30 users of the application, this means that the
system supervisor must manage 150 different users names.
In order to avoid this complication I'm looking for a way of changing
the user's default outlook Express account (and therefore the sender
address, signature, etc.) programmatically. In other words I would
like to be able to set both the "From" address and the "Mailto"
address when generating the message.
My question therefore is: can I solve this problem with OEAPI?