PostalCode property

MapPoint North America 2006 SDK

Returns the post code, postal code, or ZIP Code of the specified StreetAddress object. Read-only String.

Applies to

Objects:  StreetAddress

Syntax

object.PostalCode

Parameters

Part Description
object Required. An expression that returns a StreetAddress object.

Example

  Sub ReturnPostalCode()

  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 98052"   Set objSA = objMap.ParseStreetAddress(strAddress)
  'Return the postal code of the parsed address   MsgBox "Postal code: " + CStr(objSA.PostalCode)
  End Sub

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

Show: