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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBA Control Of GroupWise Address Book

Status
Not open for further replies.

AnotherHiggins

Technical User
Nov 25, 2003
6,259
US
I want to distribute some macros to a few individuals (as an Add In) and have the macros refer to a shared GroupWise Address Book.

I've put together some code that works for sending email, but am unable to control which Address Book it looks in to find an address.

Here's an example of what I'm using currently:
Code:
strPath = ActiveWorkbook.Path
strName = ActiveWorkbook.name
    With New GroupwareTypeLibrary.Application
        With .Login
            With .MailBox.Messages.Add(Class:="GW.MESSAGE.MAIL")
                .Subject.PlainText = "Subject Text"
                .Bodytext.PlainText = "Body Text"
                .Attachments.Add strPath & "/" & strName
                .FromText = "Auto-Generated Email"
                [red].Recipients.Add "Test Group"[/red]
                .Send
            End With
        End With
        .Quit
    End With
That works, but only if "Test Group" is in a system-generated Address Book. The recipients listed in the group will periodically change, so I'd like to have a single group in a shared Address Book so I can maintain it without having to update each user's computer.

I've been working on this forever with no luck. Any help would be greatly appreciated.

Thanks,
John
 
Bueller? Bueller?

Anyone have any ideas? Is there another forum I should try posting to?

I can't find anything on this subject anywhere. I've tried Novel's site and Microsoft’s site, but I come up empty.

Any suggestions at all would be greatly appreciated.

Thanks,
John
 
That works, but only if "Test Group" is in a system-generated Address Book".

This is probably a stupid question, but why not just maintain the distriubution group in the "Novell GroupWise Address Book" via ConsoleOne/NWAdmin? Maybe I'm confused about what you mean by "system-generated Address Book". I'm assuming this means something available system-wide as opposed to created by a specific user.

hth
 
1oldfoxman,

On the contrary, that's a very good question. Unfortunately, I'm looking at having several distribution groups (a couple of dozen), not just one. Then there's the fact that the Novell GroupWise Address Book is shared company-wide...that's several thousand users. Since only a few people will ever need to use these distribution groups, keeping them in the main Address Book isn't a viable option.

For clarification about what I mean by "system-generated Address Book": every user has access to the Novell GroupWise Address Book. In addition, every user has a Personal address book that they can maintain themselves and a Frequent Contacts address book that auto-populates with addresses to which they have sent emails. Coding for distribution groups located in any of these address books seem to email fine, but I can't get it to work from a shared address book that I create. I've asked our email admin, but he doesn't write code so he can't really help.

The end goal of all this is to be able to distribute a set of macros in Excel as an Add In. Each macro should send an email to a different distribution list. I've been trying to avoid maintaining all of my distribution lists in VBA, but that might be the best way to go. [ponder]

John
 
Try changing the line:
.Recipients.Add "Test Group"
to:
.Recipients.Add("Test Group")

This worked for me using FoxPro source code to generate the objects (which look very similar in their creation) as I'm not a VB programmer. This worked in GroupWise 6 using an address book created by another user and shared with me with READ-ONLY priveleges granted by them.
 
1oldfoxman,

I've just added the () to my code and run it from my box - that worked. Tomorrow I'll test from other user's boxes.

Thanks again for your input...I'll let you know what happens tomorrow.

John
 
grr.

Still no luck. I tried changing File>Name Completion Sort Order in the user's address book so it includes my shared folder, but it still doesn't work. I don't get a "User not defined" error like I would without the parentheses, but it just creates an email that sits in the user's mailbox with no recipient listed?!?

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top