You can do things like:
set OL = GetObject(,"OUTLOOK.APPLICATION")
set MAPI = OL.GetNamespace("MAPI")
Set myItems = MAPI.GetDefaultFolder(10).Items
where the default folder number 10 is Contacts (Or call it olFolderContacts).
Ot you can select folders and move down the levels if you need to look into the Public Folders area. Something like (although this is a .VBS script file):
VB Code:
Set WshShell = WScript.CreateObject("WScript.Shell")
set OL = GetObject(,"OUTLOOK.APPLICATION")
set myMAPI = OL.GetNamespace("MAPI")
Set myStore = myMAPI.Folders("Public Folders")
Set myItems = myStore.Folders("Company Contacts")
MsgBox "Looking at " & myItems.Items.Count & " items"