By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,163 Members | 944 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,163 IT Pros & Developers. It's quick & easy.

Groupwise Email from MS Access 2000

P: n/a
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
Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On Feb 10 2004, 10:02 am, at*******@hotmail.com (Atim) wrote in
news:5d**************************@posting.google.c om:
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.


In the code that you posted, you are using something called GroupWise
Object API to interact with the Groupwise engine. Object API does not
provide any user interface features - for example, the regular New Message
window that you see when you send a new email in Groupwise is provided by
the Groupwise client, which in turn uses Object API to interact with the
engine (more or less).

You have two options:

1. Create your own New Message window using an Access form. Then, from
code, create a new message based on user input on that form and send it.
In this case, the Groupwise class at
http://www.users.cloud9.net/~dfurman/code.htm may be useful to wrap the
Object API functionality in an easily accessible way.

2. Use Groupwise tokens. This is a method that allows you to automate
Groupwise client itself, so that you can start the client, open the regular
New Message window, prepopulate some of the fields, then have the user do
the rest. The code to do that is significantly different compared to what
you posted. Samples and documentation are available at
http://developer.novell.com/ndk/gwtoken.htm

--
remove a 9 to reply by email
Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.