• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Print Selection
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Print Selection


  • Subject: Re: Print Selection
  • From: Paul Berkowitz <email@hidden>
  • Date: Sun, 08 Jun 2008 09:26:28 -0700
  • Thread-topic: Print Selection

Title: Re: Print Selection
If you mean by selection "the selected [highlighted] portion of a sheet", you can't. If you mean that you want to specify just which bit (range, or page) to print, you can.

Instead of using 'print' in the Standard Suite (which is useful mostly if you want to print numerous workbooks all in one command), use the 'print out' command from either the Microsoft Excel suite or - more usefully for what I think you're asking - from the Table Suite. The version from the Microsoft Excel Suite allows to specify just a sheet (e.g. 'active sheet') rather than the whole workbook, and to specify 'from' and 'to' pages. But the version in the Table Suite allows to to narrow down to a specific range:

print out
print out (verb)Prints the object (from Table Suite)
command syntax
print out range ¬
     from integer ¬
     to integer ¬
     copies integer ¬
     preview boolean ¬
     active printer unicode text ¬
     print to file boolean ¬
     collate boolean

That means you can

tell application "Microsoft Excel"
   print out range "A1:K10" of active sheet
end
tell
   

And that's all there is to it.

--
Paul Berkowitz



From: Fintan Healy <email@hidden>
Date: Sun, 08 Jun 2008 08:25:12 +0300
To: AppleScript-Users <email@hidden>
Subject: Print Selection

Hi, I am a newbie to applescript and am just getting going on some MS office scripts.  I want to tell Excel to print a selection of the sheet, rather than a the whole workbook.  Have tried various things but seem to be going ‘round in circles.  Can anybody tell me how to print a selection please?
Thanks
Fintan




_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >Print Selection (From: Fintan Healy <email@hidden>)

  • Prev by Date: Re: gui scripting - paste script not working
  • Next by Date: Re: Re: gui scripting - paste script not working
  • Previous by thread: Print Selection
  • Next by thread: Text as list
  • Index(es):
    • Date
    • Thread