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 <> "" then
Set User = MyEntries(MyName)
User.Details
item.userproperties.find("Field1" = User.Name '**** Name
item.userproperties.find("Field2" = User.Fields.item(&h3a28001e).value '**** State
item.userproperties.find("Field33" = User.Fields.item(&h3a30001e).value '**** Assistant
End If
End Sub
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 <> "" then
Set User = MyEntries(MyName)
User.Details
item.userproperties.find("Field1" = User.Name '**** Name
item.userproperties.find("Field2" = User.Fields.item(&h3a28001e).value '**** State
item.userproperties.find("Field33" = User.Fields.item(&h3a30001e).value '**** Assistant
End If
End Sub