How to set portrait/landscape in print dialog box

OK, this one here works with the Page Setup dialog window of Microsoft Word. Try it with SnagIt (replace the process name in line 2):

tell application "System Events"
  tell application process "Microsoft Word"
    tell window 1
      tell radio group 1
        tell (first radio button whose description is "Landscape")
          if value of attribute "AXValue" is not 1 then perform action "AXPress"
        end tell
      end tell
    end tell
  end tell
end tell

Note: I added the value check for the button also to the Scapple Print dialog script above. Please use the new version!

(Without value check the script would deselect an already selected Landscape button.)

2 Likes