• 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: Printing 2-up duplex in Word (without VBA?) (Was: Scripting Excel: How to find values in cells of kind date)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Printing 2-up duplex in Word (without VBA?) (Was: Scripting Excel: How to find values in cells of kind date)


  • Subject: Re: Printing 2-up duplex in Word (without VBA?) (Was: Scripting Excel: How to find values in cells of kind date)
  • From: Paul Berkowitz <email@hidden>
  • Date: Mon, 17 Sep 2007 19:37:20 -0700
  • Thread-topic: Printing 2-up duplex in Word (without VBA?) (Was: Scripting Excel: How to find values in cells of kind date)

On 9/17/07 3:47 PM, "Nathan Bailey" <email@hidden> wrote:

> Paul Berkowitz wrote:
>> ... when
>> AppleScript in 2004 and 2008 can do just about everything that VBA can do.
>>
> How can you do "print pages 1-4 of the current document in 2-up duplex"
> in AppleScript, without VBA?
>
> I know I can print pp1-4 with:
>    do Visual Basic " ActiveDocument.PrintOut Range:=wdPrintFromTo,
> From:=\"1\", To:=\"4\""
> and I know that VBA has "SetDuplex 3" for duplex long-binding and
> "PrintZoomColumn:=2" for printing two pages on one, but I haven't found
> anything equivalent for doing it in plain AppleScript.

Surely you checked Word's 'print out' AppleScript command in the dictionary
before asking? (You need Word 2004, of course.)

The dictionary has a 'print out range' parameter with enumeration values
that include 'print from to' and 'page from' and 'page to' parameters. It
has a boolean 'manual duplex print' parameter, but that is not available in
US English versions, and neither is its equivalent in VBA in Word 2004 or
any Mac version.

I don't see anything like "SetDuplex 3" for duplex long-binding and
"PrintZoomColumn:=2" for printing two pages on one anywhere in the VBA
editor in Word 2004, so you're making that up. Are you doing this on Windows
rather than the Mac? The VBA on the Mac is stuck back at VBA 5.0 used in
Word 97 (Windows)  and 98 (Mac): there have been no upgrades to the VBA on
the Mac since then. So if there are arguments you are using for Word Windows
2000, 2002, 2003 or 2007: sorry, you can't use them on the Mac.  The
AppleScript for 2004 is essentially new AppleScript hooks into the same OLE
level that provides the VBA, so it's not there either. There may be some
improvements for 2008, but I don't know whether that would be one of them.

Anyway, for

    do Visual Basic " ActiveDocument.PrintOut Range:=wdPrintFromTo,
From:=\"1\", To:=\"4\""

The dictionary would indicate:

    print out active document print out range print from to page from 1 page
to 4

It compiles, but does nothing. It looks like a bug to me: I'll report it.

The Word AppleScript Guide you can get from the MacTopia website
(/Developers/AppleScript) should explain some of the options and give a few
examples in the same way that VBA Help does.

--
Paul Berkowitz


 _______________________________________________
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: 
 >Printing 2-up duplex in Word (without VBA?) (Was: Scripting Excel: How to find values in cells of kind date) (From: Nathan Bailey <email@hidden>)

  • Prev by Date: Printing 2-up duplex in Word (without VBA?) (Was: Scripting Excel: How to find values in cells of kind date)
  • Next by Date: Scripting Excel: simple column copies
  • Previous by thread: Printing 2-up duplex in Word (without VBA?) (Was: Scripting Excel: How to find values in cells of kind date)
  • Next by thread: Ringtones in iTunes 7.4 break database ID retrieval?
  • Index(es):
    • Date
    • Thread