• 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: closing MSWord files
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: closing MSWord files


  • Subject: Re: closing MSWord files
  • From: Shane Stanley <email@hidden>
  • Date: Tue, 28 Nov 2000 08:10:09 +1100

On 28/11/00 5:18 AM +1000, Carl West, email@hidden, wrote:

> I get the feeling that somehow I'm not closing the MS Word files
> properly in the script below.

It's probably because you're closing the window, rather than the document.

FWIW, this is what I use for Word to text conversions -- it handles
revisions and tables:

on open fileList
with timeout of 300 seconds
tell application "Microsoft Word"
repeat with dataFile in (fileList as list)
set fullPath to (dataFile as text)
open file fullPath
-- in case:
do Visual Basic " ActiveDocument.AcceptAllRevisions"
-- convet tables to tab-delimited; default otherwise is return-delimited
repeat
if exists table 1 then
select table 1
do Visual Basic " Selection.Rows.ConvertToText
Separator:=wdSeparateByTabs"
else
exit repeat
end if
end repeat
set theName to name of window 1
if (count of theName) > 25 then
set fullPath to (text 1 thru 24 of fullPath) & "
"
end if
save document 1 in file (fullPath & ".txt") as "Text Only"
close document 1 saving no
end repeat
end tell
end timeout
end open

--
Shane Stanley, email@hidden


References: 
 >closing MSWord files (From: Carl West <email@hidden>)

  • Prev by Date: Re: closing MSWord files -- Solved
  • Next by Date: Re: ANNOUNCE: Script Debugger 2 mailing list
  • Previous by thread: Re: closing MSWord files -- Solved
  • Next by thread: *PDF script
  • Index(es):
    • Date
    • Thread