Help with Words "print to file"

Hi
I wrote this script:


tell application "Finder"
	set myNewFolderName to (path to desktop folder) & "wordPS" as string
	if exists folder myNewFolderName then
	else
		set myNewFolder to (make new folder at desktop with properties {name:"wordPS"})
		
	end if
	set myNewFolder to myNewFolderName as alias
	set myFilePath to result as string
	
	set theText to "Do not work off server; Work off your desktop!"
	display dialog theText
	
	set myWordfolder to (choose folder)
	set theseWordFiles to every file of myWordfolder
	set newFilenames to {}
	set myFilenames to name of every file in myWordfolder
	repeat with aFilename in myFilenames
		
		set the newFilename to (characters 1 thru -4 of aFilename) as string
		set newFilenames to newFilenames & newFilename
	end repeat
end tell


repeat with i from 1 to (count of theseWordFiles)
	set myDoc to item i of theseWordFiles
	set myDocname to item i of newFilenames
	set mynewDocName to myFilePath & myDocname & "ps" as string
	tell application "Microsoft Word"
		activate
		open myDoc
		print out active doutput file name mynewDocName with print to file
		
		
		close active document
	end tell
end repeat

I get the message: Microsoft Word got an error: active doesn't understand the print out message.

Please help, if you can.

Thanks.

:(


Seems pretty obvious to me:

       print out active doutput file name mynewDocName with print to file

you’re telling it to print out ‘doutput’. ‘doutput’ doesn’t exist in Word’s dictionary, nor is it a variable in your script, so it’s bound to error.

Maybe what you mean is something more like:

       print out (get active document) output file name mynewDocName with print to file

or some such.