change filemaker print setup / page orientation

I just re-discovered the benefits of Apple Scripts in combination with my Filemaker DB. Sometimes I need change the page orientation when printing from my fm-db. When using a real printer I managed to switch the page orientation automatically. When generating pdf-files I need the page orientation to be set to portrait but I couldn’t find a way within FM (FM 9, OSX 10.5). If the last document happened to be printed in landscape the pdf will come out this way too.
So I tried to use apple script to set the page orientation and came up with this. Unfortunately FM doesn’t like it.

tell application "FileMaker Pro"
	tell (print setup of document in front)
		set orientation to portrait
	end tell
end tell

Filemaker will only answer with an error - (translated from German) “Filemaker reported an error. invalid user request”.

I’d be great if someone could help me out here! Many thanks in advance.

take care


Use Print Setup in FileMaker.

Set the orientation to landscape before you print and then set it back to portrait
at the end of the script.



Hi Craig!
Thanks for your answer! it works!