Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel VBA Code to Control Address Book

Status
Not open for further replies.

AnotherHiggins

Technical User
Nov 25, 2003
6,259
US
I'd like to be able to control groups within address books in GroupWise using VBA to send excel workbooks. For example, Say I have a group called "TestGroup" that is in a shared address book called "Everyone." I'd like to be able to utilize that group instead of listing several recipients within my macro. Here is a snippet of the code I'm using currently. I think I'm close, but I don't know where to go from here:

Code:
x = ActiveWorkbook.Path
y = ActiveWorkbook.Name
z = Array("recipient1@somewhere.com", "recipient2@somewhere.com")

    With New GroupwareTypeLibrary.Application
        With .Login
            With .MailBox.Messages.Add(Class:="GW.MESSAGE.MAIL")
            .Subject.PlainText = "Sample Subject Line"
            .Bodytext.PlainText = "Sample Body Text"
            .Attachments.Add x & "/" & y
            .Recipients.Add z 'this is what I want to change
            .Send
            End With
        End With
        .Quit
    End With

BTW, I’m using Excel 2000, Visual Basic 6.0 and GroupWise 6.5.2B.

Any help would be greatly appreciated,
John
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top