Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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:
http://lists.apple.com/mailman/options/applescript-users/email@hidden
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.