Application.GetAddress procedure builder

Application.GetAddress (Word)

Returns an address from the default address book.

GetAddress (Name, AddressProperties, UseAutoText, DisplaySelectDialog, SelectDialog, CheckNamesDialog, RecentAddressesChoice, UpdateRecentAddresses)

Dim strAddress 
strAddress = Application.GetAddress(Name:="John Smith", _ 
ActiveDocument.Range(Start:=0, End:=0).InsertAfter strAddress


Optional arguments

The following arguments are optional

Name - The name of the addressee, as specified in the Search Name dialog box in the address book

AddressProperties - If UseAutoText is True, this argument denotes the name of an AutoText entry that defines a sequence of address book properties. If UseAutoText is False or omitted, this argument defines a custom layout. Valid address book property names or sets of property names are surrounded by angle brackets ("<" and ">") and separated by a space or a paragraph mark (for example, " " & vbCr & ""). If the AddressProperties parameter is omitted, a default AutoText entry named "AddressLayout" is used. If "AddressLayout" hasn't been defined, the following address layout definition is used: " " & vbCr & "" & vbCr & "" & ", " & "" & " " & "" & vbCr & "". For a list of the valid address book property names, see the AddAddress method

UseAutoText - True if AddressProperties specifies the name of an AutoText entry that defines a sequence of address book properties; False if it specifies a custom layout

DisplaySelectDialog - Specifies whether the Select Name dialog box is displayed, as shown in the Results table

SelectDialog - Specifies how the Select Name dialog box should be displayed (that is, in what mode), as shown in the Display mode table

CheckNamesDialog - True to display the Check Names dialog box when the value of the Name argument isn't specific enough

RecentAddressesChoice - True to use the list of recently used return addresses

UpdateRecentAddresses - True to add an address to the list of recently used addresses; False to not add the address. If SelectDialog is set to 1 or 2, this argument is ignored