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

VBScript to import data from Outlook Addressbook

Status
Not open for further replies.

sbauerle

Technical User
Mar 14, 2002
17
DE
Hello,

I am trying to import data from the Outlook Addressbook into a custom form in Outlook 2000 using VB Script. So far I was able to put the name into field1. But I can not read out the data from the other fields.
See the listing below

I am very thankful for any help
Stefan


Sub Select_Click
Set MyNameSpace = Application.GetNameSpace("MAPI")
Set MyAddressList = MyNameSpace.AddressLists("Global Addressbook")
Set MyEntries = MyAddressList.AddressEntries
MyName = InputBox("Enter Name")
If MyName <> &quot;&quot; then
Set User = MyEntries(MyName)
User.Details
item.userproperties.find(&quot;Field1&quot;) = User.Name '**** Name
item.userproperties.find(&quot;Field2&quot;) = User.Fields.item(&h3a28001e).value '**** State
item.userproperties.find(&quot;Field33&quot;) = User.Fields.item(&h3a30001e).value '**** Assistant
End If
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top