A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Getting "Department" from entry in Global Address List



 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old October 16th 06, 02:29 AM posted to microsoft.public.outlook.program_vba
Kryer
external usenet poster
 
Posts: 11
Default Getting "Department" from entry in Global Address List

Ken or Michael -
Along with the AddressEntries collections is the Title exposed to the
Outlook object Model. I am trying to write some VBS for a custom form. On the
form I have a custom text box and I want to say on open of this custom form
that if you title is not equal to Collections Supervisor that the text box
becomes locked or invisible.

The current code I have now is
Function Item_Open()
if ??????? "Collections Supervisor" then
Item.GetInspector.ModifiedFormPages("Message").Tex tBox4.Visible = False
End if
End Function

?????? would be the code for where I would find the address book entry: Title.

Is this possible?

"Ken Slovak - [MVP - Outlook]" wrote:

A GAL entry is not a contact but it is an AddressEntry among the
AddressEntries collection of the GAL AddressList. Unfortunately Department
is not exposed to the Outlook object model for AddressEntry objects. You
would have to use a different API such as CDO 1.21 (optional installation
for Outlook 2000 and later) or Extended MAPI (C++ or Delphi only) or
Redemption (3rd party library at www.dimastr.com/redemption).

The property tag you would use for Department in one of those other API's is
PR_DEPARTMENT_NAME (0x3A18001E).

You can see examples of CDO 1.21 code at http://www.cdolive.com/cdo5.htm

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"SixSigmaGuy" wrote in message
...
Hi,

When I'm using Outlook and double click on a resolved name in the address
field of an email, a dialog box opens showing several properties of that
entry. One of the properties is "Department". I'm trying to write code
that
will retrieve the "Department" name for entries in the GAL, but I can't
figure out how to do it? Can anyone tell me how to get the "Department"
name
for an entry?

I see how to get it for a contact in the contacts folder, but not for the
GAL.

Thanks,

Rick



 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Second entry in Global Address List SteveB Outlook - Using Contacts 0 October 11th 06 04:05 PM
Explain Journal entry vs. "Notes" section on Contact "Box" Charles Dice Outlook - Using Contacts 1 July 11th 06 03:50 PM
Change multiple entries in the "Department" field of my Contacts Armor Outlook - Using Contacts 1 March 21st 06 07:52 PM
Address Book "New Entry" Form samearle Outlook - Using Forms 5 February 28th 06 09:38 PM
Officewide "Global" Distribution List L Walker Outlook - Using Contacts 1 January 27th 06 07:11 AM


All times are GMT +1. The time now is 06:50 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.