Macro will not record Print

13 views
Skip to first unread message

Ash Norton

unread,
Sep 26, 2022, 4:47:16 PM9/26/22
to Google Apps Script Community
Greetings all,
My company is using Google Sheets to generate SKU labels. (Not like a mailing list. We generate labels one at a time on a Dymo printer.) I'm trying to automate the printing process to reduce click through time and errors. I want a macro(s) that prints one sheet (the Label) and then clears certain cells on another sheet (the Template).
     When I Macro Record myself doing this as desired, Google Sheets does not record any of the print user interactions.
     a) Why is this?
     b) Is there a workaround that DOESN'T involve generating a pdf?
     c) Google Sheets remembers my print settings. Is there a way to see these "under the hood", meaning in Script? That way I can paste it in with my recorded macro...

For anybody else looking to reduce click through time, once you've established your print settings for the sheet keyboard:
  1) [Ctrl] + [P] to call up the print preview
  2) [Tab] to highlight the Next button then [Enter]
  3) [Enter] again on the print dialog
I wish Macro Record would record that but it does not -as of this writing.

Thank you for your precious time.

Andrew Roberts

unread,
Sep 27, 2022, 4:29:31 AM9/27/22
to google-apps-sc...@googlegroups.com
The only printing API I'm aware of is cloud-print which was deprecated a couple of years ago. So I wouldn't be surprised if you can't automate the printing.

You can see the script generated when recording the macro by looking in the script editor (Extensions > Apps Script).

--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/2181b500-8ecd-43bf-a4dd-eca0cf281225n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages