Welcome to Dream.In.Code
Become a VB.NET Expert!

Join 150,031 VB.NET Programmers for FREE! Get instant access to thousands of VB.NET experts, tutorials, code snippets, and more! There are 1,600 people online right now. Registration is fast and FREE... Join Now!




Extract E-Mail Addresses from Groups in Groupwise

 
Reply to this topicStart new topic

Extract E-Mail Addresses from Groups in Groupwise

shughes
28 Feb, 2008 - 10:49 AM
Post #1

New D.I.C Head
*

Joined: 28 Feb, 2008
Posts: 1

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



User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/8/09 09:36PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live VB.NET Help!

VB.NET Tutorials

Reference Sheets

VB.NET Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month