Send E-Mail from MSAccess using Groupwise

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I've got a form called EMail in MSAccess that contains a field named
EMailToAddress. This field populates from a table of e-mail addresses.

On the EMail form, I have a subform (Messages) that has 2 fields (Subject
and Message).

On the main form (EMail) I have a button I want to use to send an e-mail to
the address specified on the EMail form (EMailToAddress) and that uses the
Subject and Message field contents from the subform.

Here's the code:
Private Sub EMail_Click()

Dim ToAddress, CCAddress, BCCAddress, Subject, MessageText As String

ToAddress = Forms!(e-mail address removed)
 
Robert:

Have you stepped through your code using a break point and made sure the
value of the ToAddress is filled as a variable?

Also, if your Dim statement is a direct copy from your code, then note that
ToAddress, CC etc are all variants, not strings (although that shouldn't
make a difference), if you want them to be strings, you've go to write it
like this?

Dim ToAddress as String, CCAddress as String
Dim BCCAddressas String, Subject as String, MessageText As String

(Note if you want to try another method other than SendObject, try our PDF
and Mail Library which supports interface with GroupWise mail systems.)
 
Steve,

I added a msg line to check if the ToAddress variable captured the e-mail
address, and it did:
ToAddress = Forms!(e-mail address removed)
 
Back
Top