CanonicalMediaName Example

Using Programming Languages other than VBA

Sub Example_CanonicalMediaName()
	' This example finds the name of the media for the active layout

	Dim MediaName As String
	MediaName = ThisDrawing.ActiveLayout.CanonicalMediaName

	If MediaName = "" Then
		MsgBox "There is no media set for the active layout."
		MsgBox "The media for the active layout is: " & MediaName
	End If
End Sub