Script - Convert Apple Pages document to PDF

That works for me! But you first have to start the script and MS Word once. After that it works!

  property extensionList : {"doc", "docx"}

   tell application id "DNtp"
   set theInput to {}
   set theSelection to the selection
   repeat with theRecord in theSelection
   	set theFile to (path of theRecord) as POSIX file
   	set theDoc to theFile as alias
   	
   	tell application "Finder"
   		set theFilePath to container of theDoc as text
   		set ext to name extension of theDoc
   		if ext is in extensionList then
   			set theName to name of theDoc
   			set theFilename to characters 1 through ((length of theName) - (length of ext) - 1) of theName as string
   			set theFilename to theFilename & ".pdf"
   			
   			tell application "Microsoft Word"
   				set theOldDefaultPath to get default file path file path type documents path
   				set default file path file path type documents path path theFilePath
   				open theDoc
   				set theActiveDoc to the active document
   				set theFilePath to (path to trash) as string
   				set default file path file path type documents path path theFilePath
   				-- save as theActiveDoc file format format document default file name theFilename
   				save as theActiveDoc file format format PDF file name theFilename
   				close theActiveDoc
   				set default file path file path type documents path path theOldDefaultPath
   			end tell
   			
   			set theConvertedPath to (theFilePath & theFilename as string)
   		end if
   	end tell
   	
   	set theConvertedRecord to import POSIX path of theConvertedPath to (parent 1 of theRecord)
   	#if exists theConvertedRecord then tell application "Finder" to delete theConvertedPath
   end repeat
   end tell