Share via


FileName property

Returns or sets the file name for the specified Web page. Read/write String.

Applies to

Objects:  SavedWebPage

Syntax

object.FileName

Parameters

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

Example

    Sub GetWebPagesFileName()

  Dim objApp As New MapPoint.Application   Dim objMap As MapPoint.Map   Dim objRoute As MapPoint.Route   Dim objLoc As MapPoint.Location
  'Set up the application   Set objMap = objApp.ActiveMap   Set objRoute = objMap.ActiveRoute   objApp.Visible = True   objApp.UserControl = True
  'Create a route   objRoute.Waypoints.Add objMap.FindResults("Seattle, WA").Item(1)   objRoute.Waypoints.Add objMap.FindResults("Redmond, WA").Item(1)   objRoute.Calculate
  'Save a Web page and then find the file name of it   objMap.SaveAs "SavedWeb", geoFormatHTMLMapAndDirections   MsgBox "File name of Web page: " + objMap.SavedWebPages.Item(1).FileName
  End Sub

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