PROBLEM

ArcMap closes when using VBA to specify IArcPressPrinter::Driver

Last Published: April 25, 2020

Description

ArcMap will crash when using Visual Basic for Applications (VBA) code to specify a driver on the IArcPressPrinter interface.

Cause

The IPrinter::Paper object was not set up correctly.

Solution or Workaround

This problem is addressed in ArcGIS 8.1.2.

The following code snippet demonstrates how to set up the IPrinter::Paper object before specifying a driver.

Code:
Dim pApp as IApplication
Set pApp = Application

Dim pMxApp as IMxApplication
Set pMxApp = pApp

Dim pPrinter as IPrinter
Set pPrinter = New ArcPressPrinter

Dim pArcPressPrinter as IArcPressPrinter
Set pArcPressPrinter = pPrinter

Set pPrinter.Paper = pMxApp.Paper

pArcPressPrinter.Driver = <member of esriArcPressDriverPrinters>

Article ID:000003631

Software:
  • ArcMap 8 x

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Discover more on this topic