I'm trying to create an email message in Novell Groupwise (from
Access) which the user can edit before sending. Using the code below,
I can create a message just fine, but the problem is that it gets sent
out automatically, which is not what I want. If I comment out the
Call Message.Send part of the code, it stores the message in the Work
in Progress Folder, which is great - but it deletes all the
recipients' addresses in the "TO:" field.
Does anyone know of a way that I can fix the code so it doesn't send
the email out automatically, but allows the user to edit it before
sending.
Thank is advance for your help.
************************************************** ****************************
Private Sub Send_External_Mail()
Dim asloginname As String
Dim asloginoptions As String
' GroupWise Object API variabls
Dim GWApplication As Object
Dim GWRootAccount As Object
Dim GWAddressBooks As Object
Dim GWFolders As Object
Dim GWMailBoxFolder As Object
Dim gMessage As Object
Dim gRecipients As Object
Dim gAttachments As Object
Dim i As Integer
'On Error GoTo eSend_External_Mail
asloginname = ""
asloginoptions = ""
' Get the application object, login, and initialize the base object
Set GWApplication = CreateObject("NovellGroupWareSession")
Set GWRootAccount = GWApplication.Login(asloginname, asloginoptions)
Set GWAddressBooks = GWRootAccount.AddressBooks
Set GWFolders = GWRootAccount.AllFolders
Set GWMailBoxFolder = GWRootAccount.Mailbox
Dim lWorkFolder As Object
Dim lWorkMessages As Object
Dim lMessage As Object
Dim lGWMessage As Object
' In order to send a message, it must be created from the 'WorkFolder'
list
Set lWorkFolder = GWRootAccount.WorkFolder
Set lWorkMessages = lWorkFolder.Messages
' Add a blank message to the list
Set lMessage = lWorkMessages.Add("", "")
lMessage.bodytext.plaintext = strMessage 'RTrim(txtMessage.Text) +
vbLf
lMessage.Subject.plaintext = strSubject 'txtSubject.Text
'For i = 0 To GWncc1.Count - 1
Call lMessage.Recipients.Add(strTo) 'GWncc1.EmailAddress(i))
'Next
Call lMessage.Attachments.Add(strFile, "", MailTo & " Report.rtf")
'gsAttachmentDisplayName) 'txtAttachment.Text, "",
gsAttachmentDisplayName)
Call lMessage.Send
Set lGWMessage = Nothing
Set lWorkMessages = Nothing
Set lWorkFolder = Nothing
'Set CreateBlankMessage = Nothing
'MsgBox "Email sent successfully", vbInformation
' gMailForwarded = True
End Sub