• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Word 2008 script broken in Word 2011
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Word 2008 script broken in Word 2011


  • Subject: Word 2008 script broken in Word 2011
  • From: Lists <email@hidden>
  • Date: Wed, 29 May 2013 12:07:21 -0700

Shortly after Office 2008 came out I wrote several export to PDF scripts. After trying them in Office 2011, they work except for the Word export to PDF script.

The Word script creates a corrupt PDF that Preview can't open. I'm wondering if anyone has encountered this, and how did you fix it?

Here is the script I'm using:

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 flat template
close window 1 saving no
end tell
end repeat
end open

Thanks
J
 _______________________________________________
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

  • Follow-Ups:
    • Re: Word 2008 script broken in Word 2011
      • From: Paul Berkowitz <email@hidden>
    • Re: Word 2008 script broken in Word 2011
      • From: Luther Fuller <email@hidden>
  • Prev by Date: Re: Rename Folder without it moving
  • Next by Date: Re: Word 2008 script broken in Word 2011
  • Previous by thread: Re: getting a list of labels from a record?
  • Next by thread: Re: Word 2008 script broken in Word 2011
  • Index(es):
    • Date
    • Thread