Re: Off the subject....
Re: Off the subject....
- Subject: Re: Off the subject....
- From: Paul Berkowitz <email@hidden>
- Date: Thu, 18 Nov 2004 10:34:53 -0800
On 11/18/04 10:02 AM, "Martha Espinosa" <email@hidden> wrote:
>
> Does anyone know an easy way to convert a word document to a text
> file (with returns) or to web format?
In the UI, you can File-->Save As / Text Only (switch the File Format popup
to Text Only). There are also 3 other subspecies of Text Only available
there (Text Only with Line Breaks, Text Only (MS-DOS) and Text Only with
Line Breaks (MS-DOS)), but it's the regular Text Only that should get you
"(with returns)" I think. Word actually uses Mac-type carriage returns
(ASCII 13) for paragraph ends, even in Word Windows. If you mean you want
shorter lines corresponding to the line lengths as displayed in Page View,
the Text Only with Line Breaks is the one to choose.
If you mean by AppleScript, all this is possible now in Word 2004 scripting,
and can also be done for earlier versions (as well as 2004) by using the 'do
Visual Basic' command.
It looks as if this is the way to do it in Word 2004 (untested):
tell application "Microsoft Word"
save as active document file format format text line breaks
end tell
You can specify the 'file name' (i.e. file path) if you don't want the
default of saving in the same folder as the original with same name and .txt
extension.
There's an exact equivalent with 'do Visual Basic'. Look up the correct
terminology in the VB Editor Help, searching for SaveAs for earlier
versions. (I think it's
do Visual Basic
"ActiveDocument.SaveAs(FileFormat:=wdFormatTextLineBreaks"
)
Saving as web format in the UI is of course File-->Save as Web Page...
In Word 2004 AppleScript, I think that should be
save as active document file format format web archive
again with an exact equivalent in do VB.
--
Paul Berkowitz
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden