Share via


ParseStreetAddress method

Parses an address from a string into an address with constituent parts: street, city, other city, region, country, and postal code, depending on the address. Returns a StreetAddress object.

Applies to

Objects:  Map

Syntax

object.ParseStreetAddress(Address)

Parameters

Part Description
object Required. An expression that returns a Map object.
Address Required String. The address to parse.

Remarks

Only addresses in the following countries can be parsed:

Description Version
Austria MapPoint Europe
Belgium MapPoint Europe
Canada MapPoint North America
Denmark MapPoint Europe
Finland (Helsinki) MapPoint Europe
France MapPoint Europe
Germany MapPoint Europe
Italy MapPoint Europe
Luxembourg MapPoint Europe
Norway (Olso area) MapPoint Europe
Netherlands MapPoint Europe
Portugal MapPoint Europe
Spain MapPoint Europe
Sweden MapPoint Europe
Switzerland MapPoint Europe
United Kingdom MapPoint Europe
United States MapPoint North America

To find an address on the map, use the FindAddressResults method on the Map object.

Example

    Sub FindAddressFromString()

  Dim objApp As New MapPoint.Application   Dim objMap As MapPoint.Map   Dim strAddress As String   Dim objSA As MapPoint.StreetAddress
  'Set up the application   Set objMap = objApp.ActiveMap   objApp.Visible = True   objApp.UserControl = True
  'Set a string, then parse it   strAddress = "1 Microsoft Way, Redmond, WA"   Set objSA = objMap.ParseStreetAddress(strAddress)
  'Now search on this address and return first result   MsgBox "First found address: " + objMap.FindAddressResults(objSA.Street, _     objSA.City, , objSA.Region).Item(1).Name
  End Sub

Note  This sample code is specific for use in MapPoint North America; it is for illustration purposes only.