Re: Save as PDF File for Microsoft Word
Re: Save as PDF File for Microsoft Word
- Subject: Re: Save as PDF File for Microsoft Word
- From: Joe <email@hidden>
- Date: Tue, 3 Mar 2009 21:05:45 -0800
>It looks as if it may finally be possible to save Microsoft word files as PDF files without complicated UI instructions. The following script does not work, however all the language is accepted by Word. Can anyone help me complete the task?
Here is a droplet I use to convert files with Word to PDF. Be advised that Word 2008 does not preserve links in Word files when converting to PDF. However Pages will.
on open fillist
set bs to "/"
set d to "-"
tell application "Finder"
set defLoc to container of (item 1 of fillist) as alias
end tell
set destn to choose folder with prompt "You are converting Word files by copying them to PDF files." & return & "Select a location to save converted files." default location defLoc
repeat with lvar in fillist
tell application "Finder"
set thename to name of lvar
set filex to name extension of lvar
set l to length of filex
end tell
set nuname to text 1 thru text item -(l + 1) of thename
if "/" is in nuname then
set oldDelims to AppleScript's text item delimiters
set AppleScript's text item delimiters to bs
set txtLst to every text item of nuname as list
set AppleScript's text item delimiters to d
set nuname to txtLst as string
set AppleScript's text item delimiters to oldDelims
end if
set filname to (destn as string) & nuname & "pdf"
tell application "Microsoft Word"
launch
open lvar
save as active document file name filname file format format PDF
close window 1 saving no
end tell
end repeat
end open
Joe
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden