PrintOut method
Prints the map or driving directions with current options.
Applies to
Objects: Map
Syntax
Click a parameter to jump to its description below.
object .PrintOut([OutputFileName], [Title], [Copies], [PrintArea], [PrintQuality], [PrintOrientation], [Collate], [IncludeLegend], [IncludeOverview], [Faxable])
Parameters
Part | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
object | Required. An expression that returns a Map object. | ||||||||||||||||||||||||
OutputFileName | Optional String. Path and file name of the output file; similar to selecting Print to file in the Print dialog box. Default value is None. | ||||||||||||||||||||||||
Title | Optional String. Title on the printed map. Default value is used if this is left blank. | ||||||||||||||||||||||||
Copies | Optional Integer. Number of copies to print. Default value is 1 . | ||||||||||||||||||||||||
PrintArea | Optional GeoPrintArea. What is printed. Default value is geoPrintMap.
| ||||||||||||||||||||||||
PrintQuality | Optional GeoPrintQuality. Quality level of the map to print. Default is geoPrintQualityNormal.
| ||||||||||||||||||||||||
PrintOrientation | Optional GeoPrintOrientation. Page orientation of the map to print. Default value is geoPrintPortrait.
| ||||||||||||||||||||||||
Collate | Optional Boolean. When printing multiple copies of a document, indicates whether to print all pages of the document before printing the next copy. If True, multiple copies will be collated. Default value is False. | ||||||||||||||||||||||||
IncludeLegend | Optional Boolean. Indicates whether the map legend is included in the printout. If True, the map legend is included. Default value is False. | ||||||||||||||||||||||||
IncludeOverview | Optional Boolean. Indicates whether the Overview Map is included in the printout. If True, the Overview Map is included. Default value is False. | ||||||||||||||||||||||||
Faxable | Optional Boolean. Indicates whether to print a black and white map that is suitable for faxing. If True, the printed map is faxable. Default value is False. |
Remarks
To print route summary statistics on a separate page, use the IncludeRouteSummary property of a PageSetup object.
To set other properties for the printed page, use the properties associated with the PageSetup object.
Example
Sub PrintTurnByTurnRoute()
Dim objApp As New MapPoint.Application
Dim objMap As MapPoint.Map
Dim objRoute As MapPoint.Route
'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("Spokane, WA").Item(1)
objRoute.Calculate
'Print 2 draft copies of the route turn-by-turn with an Overview Map
objMap.PrintOut , "Turn-by-turn route", 2, _
geoPrintTurnByTurn, geoPrintQualityDraft, geoPrintLandscape, _
True, False, True, False
End Sub
Note This sample code is specific for use in MapPoint North America; it is for illustration purposes only.