Share via


Path property (Map)

Returns the complete path to the map file (.ptm), excluding the final separator and the name of the map file. Returns an empty string if the file has never been saved. Not available for use with the MapPoint Control. Read-only String.

Applies to

Objects:  Map

Syntax

object.Path

Parameters

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

Remarks

To return the path for a map in the MapPoint Control, use the FullMapName property of the MappointControl object. This property returns the path and file name.

Example

  
    Sub GetMapPath()

Dim objApp As New MapPoint.Application
Dim objMap As MapPoint.Map

'Set up the application
Set objMap = objApp.OpenMap(objApp.Path + "\Samples\Clients.ptm")
objApp.Visible = True
objApp.UserControl = True

'Get the path of the opened map
MsgBox "The path to the currently opened map is: " _
    + objMap.Path

End Sub