• 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
Re: Help about Word
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help about Word


  • Subject: Re: Help about Word
  • From: KOENIG Yvan <email@hidden>
  • Date: Mon, 9 Jul 2007 20:42:54 +0200


Le 8 juil. 07 à 17:36:36, Paul Berkowitz a écrit :

On 7/8/07 4:35 AM, "KOENIG Yvan" <email@hidden> wrote:

Le 6 juil. 07 à 21:33:22, KOENIG Yvan a écrit :
Hello

the original asker told me that the script works but that the
conversion loose several documents attributes which are preserved
when he does the conversion by hand in Word.

Is there somebody here knowing the way to drive Word so it will do
the task automatically (a folder of about 500 files must be converted) ?


property o : "Macintosh HD:Users:yvankoenig:Desktop:tarifs assurance
Bouchard.doc"

if name extension of (info for (o as alias)) is "doc" then my translate(o)

on translate(o)
    tell application "Microsoft Word"
        open o -- path text OK
        set n to text 1 thru -4 of o & "rtf"
        save as active document file format format rtf file name n
        close active document saving yes
    end tell
    tell application "Finder" to delete alias o
end translate

Thank you to Paul Berkowitz.

here is the final version which gave satisfaction to the original asker.

-- [Script]
property dossierSource : ""
property liste1 : {}

set leBureau to (path to desktop) as Unicode text

set dossierSource to leBureau & "mesDocs:"

tell application "Finder"
set liste1 to every file of folder dossierSource
end tell

repeat with o in my liste1
if name extension of (info for (o as alias)) is "doc" then my translate(o)
end repeat
set my liste1 to {}


on translate(original)
local n
set original to original as text
 set n to text 1 thru -4 of original & "rtf"

 tell application "Microsoft Word"
 open original -- path text OK
 save as active document file format format rtf file name n
 close active document saving yes
 end tell
 tell application "Finder" to delete alias original
end translate

-- [/Script]

Yvan KOENIG _______________________________________________
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
References: 
 >Re: Help about Word (From: Paul Berkowitz <email@hidden>)

  • Prev by Date: Re: Finding Filenames that contain a certain string
  • Next by Date: Empty Apple mail trah
  • Previous by thread: Re: Help about Word
  • Next by thread: Re: Help about Word
  • Index(es):
    • Date
    • Thread