/ Forums / Advansys Formativ / Creating Solutions with Formativ / Message view – how can I tell? / Reply To: Message view – how can I tell?
April 10, 2008 at 12:04 pm
#7845
I eventually solved this using a search on the address book. Maybe not as nice as GroupWise.AddressBookResolveFullName(), but it’s an alternative.
Set oAddressBook = GroupWise.Account.AddressBooks.Item("Novell GroupWise Address Book") ' Find out how many items are selected in GroupWise iCount = Client.ClientState.SelectedMessages.Count ' If any are selected, access each one If iCount > 0 Then For x = 1 To iCount ' Get the currently selected message Set iMsg = Client.ClientState.SelectedMessages.Item(x) strEmailAddress = iMsg.Sender.EmailAddress Set oEntries = nothing Set oEntries = oAddressBook.AddressBookEntries.Find("(<E-Mail Address> CONTAINS """ & strEmailAddress & """)") iText = "" For each oEntry in oEntries Set oFields = oEntry.Fields For each oField in oFields iText = iText & "Name: " & oField.Name & ", Value: " & oField.Value & CRLF If oField.Name = "Name" Then strDisplayName = oField.Value End If Next Next If iText = "" then ' Send the email by calling the send method ' (more code goes here) Else call MsgBox( strDisplayName & " is in GroupWise - you can't tag internal user mail as spam.", 64, CAPTION ) End If set iMsg = nothing Next End If