I just found this forum, and am pretty new to AS in general. I just purchased the 2004 edition of Office in hopes of taking advantage of the new applescript dictionary it contains. I need some help.
below is an the entry for the “print options” class in the dictionary. I’d like to be able to print an open document and set the print options via applescript. I’m able to open and print a document using the default printer/settings without a hitch. Its using these options I can’t figure out how to do. Any help is appreciated.
Class print options
Elements: print range by numeric index, satisfying a test
Properties:
base object – All properties and elements of the given class are inherited by this class. active printer Unicode text [r/o] collate boolean fit to page boolean frame slides boolean number of copies integer output type print slides/print two slide handouts/print three slide handouts/print six slide handouts/print notes pages/print outline/print four slide handouts/print nine slide handouts print color type print color/print black and white print fonts as graphics boolean print hidden slides boolean range type print range all/print range selection/print range current/print range slide range slide show name Unicode text
The print options object is associated with a presentation and controls the defaults for printing of that presentation. To change the defaults. So get the two copies of your presentation to print on a black and white printer you would write the following:
tell application “Microsoft PowerPoint”
set myPres to the active presentation
set myPrintOpts to the print options of myPres
tell myPrintOpts
set print color type to print black and white
set number of copies to 2
end tell
print out myPres
end tell
The fields in the print options object are as follows:
active printer: Returns the name of the active printer. Read-only String
collate: Determines whether a complete copy of the specified presentation is printed before the first page of the next copy is printed. Read/write
fit to page: Determines whether the slides will be scaled to fill the page they’re printed on. Read/write
frame slides: Determines whether a thin frame is placed around the border of the printed slides. Read/write
number of copies: Returns or sets the number of copies of a presentation to be printed. The default value is 1. Read/write
output type: Returns or sets a value that indicates which component (slides, handouts, notes pages, or an outline) of the presentation is to be printed. Read/write
print color type: Returns or sets the way the specified document will be printed: in black and white or in color. The default value is set by the printer. Read/write
print fonts as graphics: Determines whether fonts are printed as graphics. Read/write
print hidden slides: Determines whether hidden slides in the specified presentation will be printed. Read/write
range type: Returns or sets the type of print range for the presentation. Read/write
slide show name: Returns or sets the name of the custom slide show to print. Read/write