Open e-mail message before sending

BJS

Registered User.
Local time
Today, 19:02
Joined
Aug 29, 2002
Messages
109
Here is part of my code, in which I think my problem lies.
The code is suppose to create a Groupwise e-mail message, which it does, but my problem is that it sends it right away. I would like it to only create the message and open it, not send it.

Does anyone know what I need to add/modify:

Set cGW = New GW
With cGW
.Login
.BodyText = "Test."
.Subject = "Test E-mail"
.RecTo = strRecTo
.FileAttachments = varAttach
.FromText = ""
.Priority = "Medium"
strTemp = .CreateMessage
'.ResolveRecipients strTemp
'If IsArray(.NonResolved) Then MsgBox "Some unresolved recipients."
.SendMessage strTemp
.DeleteMessage strTemp, True
End With
 
You need to add

Code:
.Display

to view e-mail messages
 
Thanks Nero, but .Display does not work with Groupwise e-mail.

Instead I have created an Access form that displays the To, Subject and Message fields. This way the user can make modifications before sending the e-mail. Now I have a new problem:

The code uses an Array for the Recipients. I am having 2 problems with the array:

1. Here is a sample what it looks like:

Dim strRecTo(1, 3) As String

strRecTo(0, 0) = "FirstName1 LastName"
strRecTo(0, 1) = "FirstName2 LastName"
strRecTo(0, 2) = "FirstName3 LastName"

Instead of hardcoding the recipient names into the array, I would like the array to get the names from a table. The table has 4 columns and it needs to read the names from column 2 of the table. Some of fields in column 2 are not populated with names.

I am not swift with arrays....how do I do this?

2. Once the array has collected all the recipients names from the table, how do I display them on my form in the txtTo field. I would like the user to see all the recipients and allow for additions or deletions of recipients prior to sending the e-mail.

I hope I have explained myself well. I have been working on this for a while now, and I'm getting somewhat frustrated.

Thanks in advance! BJS
:confused:
 
PLEASE HELP WITH MY E-MAIL PROBLEM!!

Can anyone help with this.
I am so frustrated, I can feel the tears starting to emerge!
 
When I need an email address list in a form I import the 'Global Address List' on the exchange server. This consists of (amongst others) first name and last name fields. There are some blank entries in the table also as I do not import the group addresses.
I then use a query to skip the blanks and concatenate the 2 fields which is then displayed in a combo box on the form.
I know that Outlook works differently to Groupwise so this method may not be possible (never used Groupwise) but it might be worth a try..
Sorry I can't be of any more help. :(
 
Thank you for your reply, Nero. I am going to create a database that uses Outlook, and I look forward to trying out your suggestion. Thanks for that!

The Groupwise class I am working with requires that you work with the array. The originator of the code, Dimitri Furman, has helped me with the construction of the array, which is as follows:

Dim astrRecTo() As Variant 'declare a dynamic array
rsEmail.MoveLast
rsEmail.MoveFirst 'fully populate the recordset
astrRecTo() = rsEmail.GetRows(rsEmail.Recordcount)
...
.RecTo = astrRecTo

Thanks again for hanging in there with me, Nero!
BJS

:)
 

Users who are viewing this thread

Back
Top Bottom