Outlook Global Address List Question

vdennis

Member
I was wondering if anyone knew how to access the global address list from OutLook? The following progam, (pulled form this website) works find in getting the Contact Address List, but I need the global list:
DEFINE VARIABLE houtlook AS Com-handle NO-UNDO.
DEFINE VARIABLE hnamespace AS Com-handle NO-UNDO.
DEFINE VARIABLE hfolder AS Com-handle NO-UNDO.
DEFINE VARIABLE hitem AS Com-handle NO-UNDO.
DEFINE VARIABLE x AS integer NO-UNDO.
CREATE "outlook.application" houtlook.
hnamespace = houtlook:getnamespace("MAPI").
hfolder = hnamespace:Addresslists:ITEM(1).
DO X=1 TO hfolder:addressentries:COUNT():
hitem = hfolder:addressentries:ITEM(X).
MESSAGE hitem:NAME + " " hitem:address VIEW-AS ALERT-BOX.
END.
RELEASE OBJECT hitem.
RELEASE OBJECT hfolder.
RELEASE OBJECT hnamespace.
RELEASE OBJECT houtlook.


Any ideas?
-Dennis-
 
Top