Share via


PrintOut method

Prints the map or driving directions with current options.

Applies to

Objects: Map

Syntax

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.

GeoPrintAreaValueDescription
geoPrintDirections1Prints the driving directions as text in Portrait mode; no maps are printed
geoPrintHighlightedPlaces5Prints a street-level map for each highlighted place and Pushpin, along with any associated Pushpin text
geoPrintMap0Prints the area of the map currently displayed on the screen
geoPrintSelectedArea4Prints only the selected area of the map
geoPrintStripMaps3Prints strip maps in Landscape mode, one page per route segment, with a strip map displayed on the left side of each page and the corresponding driving directions on the right
geoPrintTurnByTurn2Prints turn-by-turn maps in Portrait mode; miniature maps showing the intersections of every turn along the route
geoPrintFullPage6Prints extended maps to use a full page

PrintQuality

Optional GeoPrintQuality. Quality level of the map to print. Default is geoPrintQualityNormal.

GeoPrintQualityValueDescription
geoPrintQualityDraft1Prints maps at the highest speed with slightly less detail than geoPrintQualityNormal and geoPrintQualityPresentation
geoPrintQualityNormal0Prints maps with good detail at an average speed
geoPrintQualityPresentation2Prints maps at the highest level of detail at a slower speed than geoPrintQualityDraft and geoPrintQualityNormal

PrintOrientation

Optional GeoPrintOrientation. Page orientation of the map to print. Default value is geoPrintPortrait.

GeoPrintOrientationValueDescription
geoPrintAuto2MapPoint will select the orientation
geoPrintLandscape1Prints documents with horizontal page orientation
geoPrintPortrait0Prints documents with vertical page orientation

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

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 specifically for use in MapPoint North America; it is for illustration purposes only.