| Scenario 1 addressed
The code for Scenario 1 (above) in vbscript:
Sub ShowApplication()
Set oApp = CreateObject("MapPoint.Application")
Set oMap = oApp.ActiveMap
oApp.Visible = True
oApp.UserControl = True
'Add a Pushpin
oMap.AddPushpin oMap.FindResults("502 Hazlett Ave NW, Canton, OH, 44708")(1)
'Add another Pushpin
oMap.AddPushpin oMap.FindResults("41423 West Tuscarawas Street, Canton OH, 44702")(1)
'Zoom to the newly created Pushpin set
oMap.DataSets.ZoomTo
oApp.ActiveMap.ZoomIn
End Sub
ShowApplication |