Web Publish (Word Processing)






This “Web Publish” script improves on AppleWorks’ built in HTML export translator by fixing some bugs and adding features to the created web page.

Enhancement Pack


This is one of the 40 scripts bundled in the Enhancement Pack for AppleWorks.

Web Publish
a Database


This other script allows you to publish your AppleWorks database document with a web search form and search engine.

AppleWorks Web
Publishing Tips,
Tricks and Bugs.


Read some gotchas and guidlines for publishing web pages from AppleWorks.


This “Web Publish” menu item is in the “Word Processing” sub menu in the Scripts menu.

This script saves the active word processing document using AppleWorks supplied HTML translator, and enhances the output. This version:
    1. Deletes any existing image output files to avoid the “Overwrite Images” dialog after initiating a save.
    2. Replaces spaces in the file name with an underscore.
    3. Inserts the title, keyword and description META tags from the documents Properties (File Menu). These META tags improve the relevance of search engines. AppleWorks 6 only.
    4. Removes the border from exported images so linked images do not have a blue border.
    5. Removes the empty border from table cells.
    6. Removes the width from tables that fill most of the page, so they adjust to each web browser’s window.
    7. Fixes the restarting of ordered lists after a sub point.
    8. Consecutive tables are joined (since AppleWorks can only show one per page).
    9. Allows alternate image URL prefix. For instance, you can store images on a faster external server.
    10. After saving as HTML and choosing image prefix the first time, it stores these per document in the Properties:Category field.
    11. If the folder containing the HTML file has the same name as the saved HTML file, then it renames the file as index.html. So, if you save the HTML to a file “products.html” in a folder “products”, it will rename as “index.html”, so a simpler URL “products/” works in the web browser.
    12. Replaces <U><BR> with <BR>, to correct an AppleWorks bug that underlines continuously.

This web page and this entire site are examples of output from this script.

Operates on the front document, which must be a word processing document.

This script works with AppleWorks 6 and AppleWorks 5.

Only registered users are permitted to use the supplied files after 14 days.

Known Limits/Bugs
Mac OS 9 has an AppleScript bug that sometimes prevents background applications from processing requests. This sometimes affects the creation of the search page. If the “beachball” stops spinning when running the Web Publish script, try clicking the Finder (eg the desktop) to bring it to the front and the script should proceed.

Upcoming versions of this script will address more of the bugs and wishes of AppleWorks web publishing. Tell us what you want.

This script is run only. Here are some important lines from the code:
tell front document
   set sourceTitle to title
   set sourceKeywords to keywords
   set sourceDescription to description
tell anyLib
   set convertedName to (ReplaceEach of sourceName by newNameChars instead of oldNameChars) & ".html"
   set newFile to new file with prompt "Save as web page:" default name convertedName
   set htmlPath to newFile as text
   set htmlName to PullItem of htmlPath at -1 between ":"

   set htmlContainerPath to ContainerPath(htmlPath)
end tell

tell application "AppleWorks 6"
   save sourceDoc in newFile using translator "HTML"
end tell
set htmlText to read newFile

©2000 BareFeetWare

Please email us any queries about this page.