My problem is extracting E-Mail addresses from groups in the Address Book.
I'm trying to send e-mails, through groupwise, from a vb.net application. I have a "GroupWise Name Completion Control" on my form. If the user selects one or more individuals, I can handle sending e-mails. If a group member is selected, I can't find any documentation on how to extract the addresses from the group. I can identify that it is a Group, but that's as far as I can get. Has anyone else done this?
CODE
Public oGroupWise As Object
Public oAccount As Object
Private Sub frmGWLogin_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
oGroupWise = CreateObject("NovellGroupWareSession")
oAccount = oGroupWise.Login
If oAccount.Remote = True Then
Text1.Text = "Remote"
Else
Text1.Text = "Connected"
End If
End Sub
Private Sub btnSend_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSend.Click
Dim egwNotResolved As Object
Dim egwAmbiguous As Object
Dim egwNotFound As Object
Dim oMessages As Object
Dim oMessage As Object
Dim oMailBox As Object
Dim oRecipients As Object
Dim oRecipient As Object
Dim oAttachment As Object
Dim oAttachments As Object
Dim GWCount As Object
Dim oMessageSent As Object
oMailBox = oAccount.MailBox
oMessages = oMailBox.Messages
oMessage = oMessages.Add("GW.MESSAGE.MAIL", "Draft")
oRecipients = oMessage.Recipients
oAttachments = oMessage.Attachments
oMessage.Subject = Me.txtSubject.Text
oMessage.BodyText.RTF = Me.txtMessage.Text
For GWCount = 0 To AxGWnccName.Count - 1
If Me.AxGWnccName.AddressType(GWCount) = GWNCCLib.AddressTypeConstants.eAddressType_IsGroup Then
'Handle groups
Else
oRecipient = oRecipients.Add(AxGWnccName.EMailAddress(GWCount))
End If
Next GWCount
oMessageSent = oMessage.Send
End Sub