multiple file types with 1 script

hey everyone.

i am still searching but I though I might post this to save some time weeding through all the posts.

I need a way of processing all Microsoft office docs to print.

so i guess i need a variable to select the proper application but i don’t know how to do that.

i have the prining side set up but no way of getting the individual apps to launch based on extension.

thanks in advance.


We could write some stuff up, but if you post what you have we can lead in the right direction


Here is what I have:

tell application “Finder”

	set targetFolder to "Macintosh_HD:Applications:Enfocus Data:Canvases:test_applescript.canvas:Applescript:"
end tell

tell application "Microsoft Word"
		set mydoc to active document
		tell mydoc
			set myname to (name of mydoc) & "_"
			tell application "Printer Setup Utility"
				set current printer to printer "Adobe PDF 8.0"
			end tell
			tell (print preferences)
				set PPD_name to "Adobe PDF 8.0"
				set print file to (targetFolder as string) & ".pdf "
			end tell
		end tell
	end try
end tell

the first problem is that Adobe PDF 8.0 won’t see the hidden target folder. that folder is within a package content of “test_applescript.canvas”.

So i though of using the cups-pdf route, but if i use cups i need 1 script to process word, excel, and powerpoint files as the location of of the output for cups is hardcoded to 1 local so setting up a canvas with multiple applscripts is out.