Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Sub CommandButton1_Click()
myName = Item.To
Set myNameSpace = Application.GetNameSpace("MAPI")
Set myGAddressList = myNameSpace.AddressLists("Global Address List")
Set myGEntries = myGAddressList.AddressEntries
Set myGEntry = myGEntries(myName)
myManager = myGEntry.Manager
Set myGEntry2 = myGEntries(myManager)
Set myPAddressList = myNameSpace.AddressLists("Personal Address Book")
Set myPEntries = myPAddressList.AddressEntries
'Add a new AddressEntry object to the personal
'address collection with the name, address, and
'manager of the name in your To field.
Set myPEntry = myPEntries.Add("Microsoft Mail Address", myName)
myPEntry.Address = myGEntry.Address
myPEntry.Manager = myGentry.Manager
'Update to persist the collection.
myPEntry.Update
'Now add the manager's info. to
'the Personal address collection.
Set myPEntry2 = myPEntries.Add("Microsoft Mail Address", myManager)
myPEntry2.Address = myGEntry2.Address
myPEntry2.Manager = myGentry2.Manager
myPEntry2.Update
End Sub