Applescript to select sheet 1 for printing
I am writing a script to save as PDF and mail a numbers sheet document: I've got the PDF and mail parts at the ready. What I am lacking is a GUI script that insures I have the correct sheet selected for print.
How might I select sheet 1 in the sheets scroll area (with Applescript)?
thanks
I think this will do what you want to select sheet 1:
tell sheet sheetName
[code to save PDF, mail]
end tell
where sheetName is a string (i.e. enclosed in quotes) or is the number 1.
This, of course, has to be within tell application and tell document 1.
Similar Messages
-
Can mac auto select pages for print by size
Hello, does anyone knows if there is a way how to set up on Mac auto selecting for printing pages by size? I need it to print loan documents for my notary public business. Using HP laser dual tray printer.
Hello Shane,
I am notary public and I would recieve file with documents that need to be printed on both legal and letter size paper. I used Adobe Acrobat from my husband's Windows computer which sorts the documents by paper size and then print's them out on correct size paper.
The printer I have is HP Laserjet 400 M401n.
Thank you for your help -
Error when select sheet for Excel file from Excel 2013 with visual basic
Dim AppXL As Object
Dim MyWorkBook as Object
Set AppXL = CreateObject("Excel.Application")
Set MyWorkBook = AppXL.Workbooks.Open("E:\MyFile.xls)
AppXL.Sheets("Sheet1").Select
The above code run with no problem when use in machines with Excel 2007 and Excel 2010.
But when run in machine with Excel 2013, error with "Out of Range" occur. Kindly advise for any solution.
TS LimWith your highlight on the AppXL.Workbooks.Open, I have solved the problem by re-position the statements.
Below are the 2 situation which works in for Outlook 2007, 2010 and 2013
Situation 1, work for Outlook 2007 and 2010 but d not 2013
With AppXL
Set WorkBookFrom = AppXL.Workbooks.Open("E:\MyFile.xls")
Set WorkBookTo = AppXL.Workbooks.Open("E:\MyFile2.xls")
WorkBookFrom.Activate
.Sheets("Sheet1").Select
.Range("A1:IV65536").Select
.Selection.Copy
WorkBookTo.Activate
.Sheets("Sheet1").Select
.Selection.PasteSpecial Paste:=-4163, Operation:=-4142, SkipBlanks:=False, Transpose:=False
.Range("A1").Select
WorkBookTo.Save
End With
Situation 2, work for Outlook 2007 and 2010 and 2013
With AppXL
Set WorkBookFrom = AppXL.Workbooks.Open("E:\MyFiel.xls")
WorkBookFrom.Activate
.Sheets("Sheet1").Select
.Range("A1:IV65536").Select
.Selection.Copy
Set WorkBookTo = AppXL.Workbooks.Open("E:\MyFile2.xls")
WorkBookTo.Activate
.Sheets("Sheet1").Select
.Range("A1").Select
.Selection.PasteSpecial Paste:=-4163, Operation:=-4142, SkipBlanks:=False, Transpose:=False
WorkBookTo.Save
End With
Thank you for indirectly help me to solve the problem.
TS Lim -
PDF for Print with interactive buttons
In ID CS4 when exporting a book to PDF, the buttons were automatically added when "interactive elements" were checked in the export dialog box. In ID CS5, the export book to PDF requires you to select the "for Print" or "Interactive". I want to create a single file that can be used for print and has some interactive elements included.
When I select export for PDF "Interactive" the two page spreads (8.5 x 11) turn to one large spread (11 x 17). I don't want the large spreads, but I do want the interactive buttons (return to last page viewed) I have at the bottom of the page.
Is there a setting I am missing?
This worked in CS4, why is it not letting me do the same thing in CS5??
Thanks for your help!ghf232 wrote:
Interactive pdfs don't support facing pages, so you'll have to tweak your design first...
See here:
http://indesignsecrets.com/interactive-pdf-from-indesign-cs5-always-has-spreads-on.php#com ment-485137
and here:
http://indesignsecrets.com/new-script-to-output-single-pages-to-interactive-pdf.php
Harbs -
Selecting pictures for Online Photo Processing Centers other than Kodak
How can I select photos for printing in Elements for online photo processing sites other than Kodak? Is there a simple way to do this in the Organizer? The online photo sites usually give me only a thumbnail view of the picture and I can't tell which is best.
The way I've been doing it is tagging photos in Elements as favorites, and then tabbing back and forth between Elements (to view the pictures) and online site (to find the name). There has to be a better way to do this!Choose your photos in the organizer and export them to a folder on your desktop, then upload from there.
-
How to hide rows and columns by AppleScript or Automator for printing
Hello,
I have to hide first empty rows (I do it by: organize - Column B is not empty)
then: By context-menu in Header of Column K: Hide column
and: By context-menu in Header of Column L: Hide column
How can I make this 3 Steps automatic with AppleScript or Automator or maybe by formula?
Thanks for any helpHere is an edited version which allow you to choose the custom template on the fly.
No need to edit a property in the script.
--[SCRIPT printtable(s)_choosecustom]
Enregistrer le script en tant que Script ou Application : printtable(s)_choosecustom.xxx
déplacer le fichier ainsi créé dans le dossier
<VolumeDeDémarrage>:Users:<votreCompte>:Library:Scripts:Applications:Numbers:
Il vous faudra peut-être créer le dossier Numbers et peut-être même le dossier Applications.
Sélectionner une partie de table, une table ou même plusieurs tables.
Aller au menu Scripts , choisir Numbers puis choisir “printtable(s)_choosecustom”
Le script crée un nouveau document depuis un modèle perso sélectionné,
puis applique « Colle les valeurs » au contenu du presse-papiers.
Il envoie enfin la commande d'impression.
--=====
L'aide du Finder explique:
L'Utilitaire AppleScript permet d'activer le Menu des scripts :
Ouvrez l'Utilitaire AppleScript situé dans le dossier Applications/AppleScript.
Cochez la case "Afficher le menu des scripts dans la barre de menus".
Sous 10.6.x,
aller dans le panneau "Général" du dialogue Préférences de l'Éditeur Applescript
puis cocher la case "Afficher le menu des scripts dans la barre des menus".
--=====
Save the script as a Script or an Application : printtable(s)_choosecustom.xxx
Move the newly created file into the folder:
<startup Volume>:Users:<yourAccount>:Library:Scripts:Applications:Numbers:
Maybe you would have to create the folder Numbers and even the folder Applications by yourself.
Select a subset of a table, a table or even several tables.
Go to the Scripts Menu, choose Numbers, then choose “printtable(s)_choosecustom”
The script create a new document based on the selected custom template,
then apply “Paste Values” to the clipboard's contents.
At last, it issue the print command.
--=====
The Finder's Help explains:
To make the Script menu appear:
Open the AppleScript utility located in Applications/AppleScript.
Select the "Show Script Menu in menu bar" checkbox.
Under 10.6.x,
go to the General panel of AppleScript Editor’s Preferences dialog box
and check the “Show Script menu in menu bar” option.
--=====
Yvan KOENIG (VALLAURIS, France)
2011/02/20
2011/03/16 -- replaced the Blank template by a custom one defined thru the property custom_template
2011/03/17 -- Let choose the custom template, no longer Paste but Paste Values.
--=====
property theApp : "Numbers"
--=====
on run
--my doyourduty()
run script doyourduty
end run
script doyourduty
--on doyourduty()
my activateGUIscripting()
Copy the selected items *)
my raccourci(theApp, "c", "c") (* cmd + c *)
Create a new document based upon Blank.template *)
set myNewDoc to my makeAnIworkDocFromCustom()
As it's a custom template, there is no default table to delete.
Delete the default table *)
tell application "Numbers" to tell document 1 to tell sheet 1 to delete table 1
my selectMenu("Numbers", 4, 8) (* Paste Values *)
my raccourci(theApp, "p", "c") (* cmd + p = Print *)
my raccourci(theApp, return, "") (* return = validate the Print command*)
--end doyourduty
end script
--=====
Creates a new iWork document from a custom template and returns its name.
example:
set myNewDoc to my makeAnIworkDocFromCustom()
on makeAnIworkDocFromCustom()
set nb_chiffres to 3 (*
2 = allow 99 templates
3 = allow 999 templates *)
Grab the localized names of the templates folders *)
tell application "Numbers"
set templates_loc to localized string "Templates"
-- set myTemplates_loc to localized string "My Templates"
end tell -- to application a
Define the path to the folder storing custom templates *)
--set chemindesmodeles to "" & (path to library folder from user domain) & "Application Support:iWork:Numbers:" & templates_loc & ":" & myTemplates_loc & ":"
set chemindesmodeles to "" & (path to library folder from user domain) & "Application Support:iWork:Numbers:" & templates_loc & ":"
Grab the list of every items stored in the folder *)
tell application "Finder"
set entire_contents to entire contents of folder chemindesmodeles
end tell
Build two lists. One contain the path to every custom templates.
The other contain the names of these templates and the names of subfolders *)
set indx to 1
set cheminde_mesmodeles to {}
set nomsde_mesmodeles to {}
set le_conteneur to ""
tell application "System Events"
repeat with i from 1 to count of entire_contents
set un_element to item i of entire_contents as text
try
if type identifier of disk item un_element is in {"com.apple.iwork.numbers.template", "com.apple.iwork.numbers.sfftemplate"} then
if name of container of disk item un_element is not le_conteneur then
set le_conteneur to name of container of disk item un_element
copy (text 1 thru nb_chiffres of "---") & space & le_conteneur to end of nomsde_mesmodeles
end if
copy un_element to end of cheminde_mesmodeles
copy text -nb_chiffres thru -1 of ("00" & indx) & space & name of disk item un_element to end of nomsde_mesmodeles
set indx to indx + 1
end if
end try
end repeat
end tell -- System Events
if my parleAnglais() then
set le_titre to "Numbers’s custom templates"
else
set le_titre to "Modèles personnalisés de Numbers"
end if
Choose the template to use.
If you select a subfolder name, the script beep and ask one more time *)
tell application (path to frontmost application as string)
repeat
set mon_choix to choose from list nomsde_mesmodeles with title le_titre
if mon_choix is false then error number -128
try
set mon_choix to text 1 thru nb_chiffres of (item 1 of mon_choix) as integer
exit repeat
on error
beep 1
end try
end repeat
end tell
tell application "Numbers"
set nb_doc to count of documents
open (item mon_choix of cheminde_mesmodeles)
repeat until (count of documents) > nb_doc
delay 0.1
end repeat
set doc_name to name of document 1
end tell -- the_App
return doc_name
end makeAnIworkDocFromCustom
--=====
on parleAnglais()
local z
try
tell application theApp to set z to localized string "Cancel"
on error
set z to "Cancel"
end try
return (z is not "Annuler")
end parleAnglais
--=====
on activateGUIscripting()
(* to be sure than GUI scripting will be active *)
tell application "System Events"
if not (UI elements enabled) then set (UI elements enabled) to true
end tell
end activateGUIscripting
--=====
==== Uses GUIscripting ====
This handler may be used to 'type' text, invisible characters if the third parameter is an empty string.
It may be used to 'type' keyboard raccourcis if the third parameter describe the required modifier keys.
I changed its name « shortcut » to « raccourci » to get rid of a name conflict in Smile.
on raccourci(a, t, d)
local k
tell application a to activate
tell application "System Events" to tell application process a
set frontmost to true
try
t * 1
if d is "" then
key code t
else if d is "c" then
key code t using {command down}
else if d is "a" then
key code t using {option down}
else if d is "k" then
key code t using {control down}
else if d is "s" then
key code t using {shift down}
else if d is in {"ac", "ca"} then
key code t using {command down, option down}
else if d is in {"as", "sa"} then
key code t using {shift down, option down}
else if d is in {"sc", "cs"} then
key code t using {command down, shift down}
else if d is in {"kc", "ck"} then
key code t using {command down, control down}
else if d is in {"ks", "sk"} then
key code t using {shift down, control down}
else if (d contains "c") and (d contains "s") and d contains "k" then
key code t using {command down, shift down, control down}
else if (d contains "c") and (d contains "s") and d contains "a" then
key code t using {command down, shift down, option down}
end if
on error
repeat with k in t
if d is "" then
keystroke (k as text)
else if d is "c" then
keystroke (k as text) using {command down}
else if d is "a" then
keystroke k using {option down}
else if d is "k" then
keystroke (k as text) using {control down}
else if d is "s" then
keystroke k using {shift down}
else if d is in {"ac", "ca"} then
keystroke (k as text) using {command down, option down}
else if d is in {"as", "sa"} then
keystroke (k as text) using {shift down, option down}
else if d is in {"sc", "cs"} then
keystroke (k as text) using {command down, shift down}
else if d is in {"kc", "ck"} then
keystroke (k as text) using {command down, control down}
else if d is in {"ks", "sk"} then
keystroke (k as text) using {shift down, control down}
else if (d contains "c") and (d contains "s") and d contains "k" then
keystroke (k as text) using {command down, shift down, control down}
else if (d contains "c") and (d contains "s") and d contains "a" then
keystroke (k as text) using {command down, shift down, option down}
end if
end repeat
end try
end tell
end raccourci
--=====
my selectMenu("Numbers",4, 8)
==== Uses GUIscripting ====
on selectMenu(theApp, mt, mi)
tell application theApp
activate
tell application "System Events" to tell process theApp to tell menu bar 1 to ¬
tell menu bar item mt to tell menu 1 to click menu item mi
end tell -- application theApp
end selectMenu
--=====
--[/SCRIPT]
Yvan KOENIG (VALLAURIS, France) jeudi 17 mars 2011 21:29:15 -
Cannot print info sheet for envy 114
cannot print info sheet for envy 114
Hi 1dunno,
What do you mean by "info sheet"? Do you mean the diagnostic page? Also, what operating system is on your computer?
If I have helped in any way, just click the Kudos star on the left. Also, if your issue has been resolved, don't forget to select Accept as Solution -
When printing a list in Address Book, how can I select more than the default Attributes and keep them selected when I print again? I want to print ALL information for contacts so I have email address, notes, phone, company, title, etc all on one page. I don't want to have to check off an additional 5 or 6 attributes each time I print out contact information. Is there a way to change the default setting for printing lists, so it is not just "phone," "photo," and "job title?"
I have a user who wants to do this same thing. I did not find any way either to default the attributes to anything other than what you see the first time. Seems like such a trivial thing, hard to believe they do not allow it. I did find a program for this called iDress but I can't seem to download it from any links on the Internet. Not sure if it is free or not, but it was recommended by a link on the Mac support site.
-
How to select the printer and select the ICC profile for printing with VBScript?
I try to automate my printing procedure in photoshop. The problem is that I don't know how to select the printer and select the icc profile for printing with vbscript like I manually do in the print-menu in photoshop?
Anyone has done this before?
Thanx!
jusClient/Server version:
- D2KWUTIL.PLL library provides a 'Select Printer' dialog box to be used in Forms: WIN_API_DIALOG.SELECT_PRINTER
http://guenter-huerkamp.dyndns.org/oracle-doc/docs/html/d2kwutil.html
I suggest you to create a form to invoke the report, allowing user to select the printer and then pass it as parameter DESNAME -
No output has been selected for Printing
I have copied standard output determination procedure for invoice,maintained output condition record & access sequence -billing document type.
I got above message in VF02/ VF03 while selecting "Issue output to'.
My requirement is to get output selection window.(automatic output).
Thanks,
VrajeshHello Vrajesh G. Nayak
1. Go to VF02, Header-output- there see if your output type comes or not.
i. if it comes, select it manually- go to communication select printer- then you can see the yellow light indicator at output screen. Then check the print preview, if ok print.
ii. If the output types doenst comes as per 1 then go to SPRO and check the output control and VV31 maintenance.
2. If it is required to set the automatic printout select the option "Print at creation/saving the document" in communcation tab while maintaining VV31.
Hope this helps.
Regards
raghu -
Im trying to print off my cv, page 1 prints off fine but page 2 does not, I'm using the selected template for curriculum vitae why does my page 2 not print?
Hi @kots
I suspect your question would be better answered in the HP Enterprise Business Community, as your HP Printer is a commercial model.
My technical expertise is with consumer products and software, I am sure the commercial folks would be happy to help if you re-post your question for them to answer. The HP Enterprise Business Community is an HP Forum designed for the Commercial and Enterprise customers to help one another. I am sure you will find some HP folks there to help too.
Click here to view the Printing and Digital Imaging. When the page opens you will see the option to 'Log in' or 'Register Now' on the right. The commercial forums are separate from the consumer boards, thus you will need to register if you don't already have a commercial account.
You may find the HP LaserJet M2727 Multifunction Printer series page helpful while you wait for somebody in the commercial Forum to respond to your inquiry.
Best of luck.
Please click the Thumbs up icon below to thank me for responding.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Please click “Accept as Solution” if you feel my post solved your issue, it will help others find the solution.
Sunshyn2005 - I work on behalf of HP -
When using a numbers spreadsheet, how do I select a specific area for printing?
When using a numbers spreadsheet, how do I select a specific area for printing?
Also this would be a question for the Numbers app fourm. Not the iMac hardware fourm.
-
How do i get an alignment sheet for a hp deskjet f4180 printer? cannot find mine.
Need Alignment sheet for HP deskjet F4180.
Help.Hi - Go ahead and follow the steps in this document to print the alignment page and run through the alignment process. Make sure you follow the entire process as stated in the document. If you don't finish the step to scan the alignment page, the printer will continue to print alignment pages.
Hope that helps
Say Thanks by clicking the Kudos thumbs up. Please mark the post that solves your problem as an Accepted Solution so other forum users can utilize the solution.
I am an HP employee. -
Pallet sheet for finished products printed in the not expected printer
Hello to all,
I have an issue right now with a user printing pallet sheet for finished products in Z602 printer. The user wanted it to be printed in printer Z630. I have checked transaction SU01 and found that the output device assigned to the user is Z630.
What would be the cause of the documents coming out in Z602?
Just to add, the user print the document via transaction CO02, if the person needs more palette sheet then he prints by transaction LT01, and LT16 is just to cancel.
Many thanks.
Regards,
Patvin
Message was edited by:
patvinHi Patvin,
You can try using T.code Co04 and after giving parameter got to Print and do print setting.
If it solve reward and close this issue
Thanks
Bala -
No data selected for printing message no 8I000
Dear All
At the time of printing J1INCHLN certificate getting error NO DATA SELECTED FOR PRINTING MESSAGE NO 8I000 , where we have data in vendor's A/C and TDS is deducted at vendor's A/C .
Some vendor under the same section allow us to print the certificate, but the in case of few vendors we r
facing the problem.
As we need to send the same to vendors help is needed.
VG.we sorted out the issue
Maybe you are looking for
-
Error Handling in Mediation for sequential Invocation in Routing rules
Hi all, I have a situation File Adapter->Mediator->BPEL Process 1->BPEL Process 2.When an error occurs in BPEL Process 1 a soap fault is returned to the mediator service. Now since the mediator service invokes BPEL process 1 synchronously hence the f
-
Disabling buttons in std ESS Web-Dynpros
Any inputs team ... Thanks. Dear Portal experts, How can we find if we can add new columns or buttons in the std ESS web-dynpros.Also if we need to disable existing buttons or hide existing columns. We are using NW04S SPS10 (EP7) & ECC 6.0 SPS10. Tha
-
Lumia 920 - Features in India?
I don't see features data sense and find my phone (though it is available in settings for no use), why should we spend 37k on this if these features are not available? Help me if these are exists?
-
How to make a Histogram from a BufferedImage?
Hi all, I am wondering how I can make a Histogram from a BufferedImage - I'm looking for some sample source code on how to this, since I have never worked with the Histogram class before. I need to know how to implement and use Histograms. I'd be gre
-
Hello everybody, since i've updated the server to 10.6.5 i have problems connecting new clients with the addressbook. The server hangs until i finish the connection attempt. Joerg