How can I print all of the open windows in Grapher using Scripter?

This article contains a sample script for printing all plot documents, worksheets, and grids that are currently open in the Grapher program.

To run this script:

  1. Click here to download the BAS file: printallopenwindows.BAS.
  2. Click Automation | Scripts | Run, select the BAS file from your downloads directory, and click Open.


  1. Copy the script below.
  2. Open Grapher and turn on the Script Manager by clicking View | Display | Script Manager.
  3. Press Ctrl+A to select all of the existing lines in the Script Manager and then press DELETE.
  4. Press Ctrl+V to paste it into the Script Manager.
  5. Click the Start/Resume icon () in the Script Manager. 

'This script prints all open Grapher plot and worksheet windows

Sub Main

  'Create Grapher as an object
  Dim Grapher As Object

  'Start Grapher
  Set Grapher = CreateObject("Grapher.Application")

  'Make Grapher visible
  Grapher.Visible = True

  'Print all graphs that are currently open
    While i < Grapher.Documents.Count+1

    'Step through each of the open windows and print

    'uncomment the next line if you want the script to close the window

    'Open the next file
    i = i+1

End Sub


Updated October 18, 2018

Was this article helpful?
1 out of 1 found this helpful



Please sign in to leave a comment.