Word - Save As - HTML
Word - Save As - HTML
- Subject: Word - Save As - HTML
- From: Mahlon Lovett <email@hidden>
- Date: Sat, 04 Aug 2007 08:15:16 -0400
- Thread-topic: Word - Save As - HTML
I'm having trouble with a script that will
- open a word file (it's in .rtf format)
- w/o changing it, save it as a Web page
- close the file
Specifically, the error msg is 'The variable html is not defined.'
--begin script--
tell application "Finder"
set selected to the selection as alias
-- none of the following 3 lines may be necessary; Word's save as is
supposed to assume path and file name
set ext to name extension of (get properties of selected )
set nam to name of selected
set nfn to my parse(nam, ext)
-- above a routine that correctly removes the extension
end tell
tell application "Microsoft Word"
open ( selected as string ) -- works fine
save as file name nfn file format html -- bad line of code
close document selected saving no
-- works fine if save as line is commented out
end tell
--end script--
I've tried these forms of the problematic line
save as file name nfn file format html
save as file format html
save as html
In every case, 'html' is thought to be a variable. Any clues would be
greatly appreciated.
Mahlon
Princeton
_______________________________________________
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