GetPrintSetup

ACCPAC Common Controls

AccpacSession.GetPrintSetup

Creates and returns an AccpacPrintSetup object that allows applications to control default printer settings.

If printer settings have been saved for the specified menuID and ProgramID, the returned object contains the saved settings. Otherwise, the object contains default print settings.

Function GetPrintSetup(
  menuID As String,
  ProgramID As String) As AccpacPrintSetup

Parameters

menuID

[in] the menu ID used to identify the print property

Menu IDs are assigned by the system and applications do not have control over the menu ID. If a specific menu ID is not known, an application should pass in the object ID or an empty string (""). In these cases, the AccpacSession object will use the system-assigned menu ID.

ProgramID

[in] the Roto ID of the application

The AccpacPrintSetup object uses the ProgramID and menu ID to locate default printer settings saved in the current user's properties file.

Return Value

Returns the AccpacPrintSetup object.

Remarks

This function is not available if the current session accesses a remote ACCPAC server. Therefore, only call this method if ACCPAC is running locally - when the session's IsRemote property is FALSE.

After obtaining the AccpacPrintSetup object, you would call its Query method to show the printer setup dialog, then call its Save method (if any printer settings have changed).