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_M ail()
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("N ovellGroupWareS ession")
Set GWRootAccount = GWApplication.L ogin(asloginnam e, asloginoptions)
Set GWAddressBooks = GWRootAccount.A ddressBooks
Set GWFolders = GWRootAccount.A llFolders
Set GWMailBoxFolder = GWRootAccount.M ailbox
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.W orkFolder
Set lWorkMessages = lWorkFolder.Mes sages
' Add a blank message to the list
Set lMessage = lWorkMessages.A dd("", "")
lMessage.bodyte xt.plaintext = strMessage 'RTrim(txtMessa ge.Text) +
vbLf
lMessage.Subjec t.plaintext = strSubject 'txtSubject.Tex t
'For i = 0 To GWncc1.Count - 1
Call lMessage.Recipi ents.Add(strTo) 'GWncc1.EmailAd dress(i))
'Next
Call lMessage.Attach ments.Add(strFi le, "", MailTo & " Report.rtf")
'gsAttachmentDi splayName) 'txtAttachment. Text, "",
gsAttachmentDis playName)
Call lMessage.Send
Set lGWMessage = Nothing
Set lWorkMessages = Nothing
Set lWorkFolder = Nothing
'Set CreateBlankMess age = Nothing
'MsgBox "Email sent successfully", vbInformation
' gMailForwarded = True
End Sub