exporting via applescript

Michael Terry formido at mac.com
Thu Feb 5 14:30:07 PST 2004


On Feb 5, 2004, at 1:14 PM, Andrew Payne wrote:

> hey all,
>
> is there a way to use omni's built in export to HTML via applescript? 
> i tried doing a save as but i wasn't having any luck.
>


Yes, by a clever, but I think undocumented method. Whatever export 
method you want can be specified in the save command by appending the 
appropriate file extension. Unfortunately, this means that export 
formats which use the same extension can't be exported to, as far as I 
know.

tell application "OmniOutliner" to tell front document
	set savePath to ((path to desktop as Unicode text) & ((get name)'s 
texts 1 thru -10) & ".html")
	save in file savePath
	open location "file://" & POSIX path of savePath
end tell


Mike



More information about the OmniOutliner-Users mailing list