WordLib

Have you ever wished you could import MS Word and OpenOffice documents right into LiveCode?

Yes, you can! Download 2.0 or 1.5, and purchase through eSellerate or LiveCode.

WordLib empowers your LiveCode projects with the ability to import word processing documents into your text fields. This currently includes Microsoft Word and OpenOffice files. Now you and your end-users can conveniently open word processing documents for display or editing, on desktop or mobile apps!

You may see attempted imitations, but WordLib is the real thing, the LC addon library that natively and independently handles MS Word files since way back in 2008! There’s no middle man or gimmicks here, no dependencies on Microsoft or another company’s product behind the scenes. It’s just your document file, the LiveCode engine, and WordLib‘s pure scripting code. WordLib reads docx, doc, and odt file formats. Extensively tested, there have been cases where this library handled content better than Word itself.

(Screenshot of an imported Word document in the Try Wordlib stack, demonstrating text styles and colors, complex borders and highlights, paragraph alignment, and animated images. The “Welcome to WordLib” you see here is part of a file that was designed in MS Word! The Try Wordlib stack interface code shows how to open documents, reload them or launch externally, display meta info, and load bundled files, on Desktop and Mobile.)

What you can do:

  • Enable your users to import MS Word and OpenOffice documents
  • Bundle help files to view inside your software or in a word processor
  • Issue one command to import docs with file selection and error check
  • Write text field contents using a word processor as external editor
  • Store documents right inside your stacks with all associated images
  • Add import capability to your own LiveCode-based word processor

More benefits:

  • Spruce up your field contents with better formatting
  • Take advantage of new and popular file formats
  • Easily display images inside fields, or even tables
  • Create documentation that’s easier to read and more useful
  • Use defined styles in Word or OpenOffice to save time on formatting

WordLib supports many document features, from text fonts, sizes, and styles to highlights, hyperlinks, and bullet lists and even images, tables, and footnotes. Supported file formats are the latest MS Word 2007+ (.docx, .docm, .xml), MS Word 2003 (.xml), OpenOffice (.odt), and MS Word 97-2003 (.doc).

Syntax:

importDocumentToField fieldName
– or –
get HTMLTextOfDocument (filePath)

 

Check out the QuickStart video!

A simple example:

start using “wordlib.rev” — load the library
importDocumentToField “myField”
— import a document
— (with auto file selection and error handling)


(Screenshot of Import Document button script in Try WordLib.rev stack)

Another example:

start using “wordlib.rev” — load the library
answer file “Choose an OpenOffice or MS Word document”
— select file
set htmlText of field “myField” to htmlTextOfDocument(it)
— import

 


Try and Buy links:

Download WordLib 2.0 (for LiveCode 5.5+)

Download WordLib 1.5 (for Revolution and LiveCode 4.x)

Register now at LiveCode or eSellerate!

(Remember to unzip the download package before running the Try WordLib stack. Open the stack inside LiveCode to use the demo!)



Changes:

WordLib 2.1 offers vastly improved legacy doc format support on Windows and other platforms! (Coming soon)

WordLib 2.0 adds many formatting features, more Mobile capabilities, document meta info, a better demo, and Android support.

WordLib 1.5 adds iOS support and easier library installation.

WordLib 1.3 adds Mac support and Windows is also fully supported.



Features:

WordLib offers support for these Word 2007 and OpenOffice features:

– Text font and size

– Bold, italic, underline, and strikethrough text

– Superscripts and subscripts

– Text border or box style

– Text color

– Text highlight color or shading

– Paragraph alignment, margins, and tab stops! *

– Paragraph borders and highlight colors! *

– Paragraph line spacing! *

– Unicode-friendly tables with column widths! *

– Hyperlinks

– Hierarchichal ordered lists and bullet lists! *

– Bullet lists

– Images!

– Footnotes and endnotes!

– Citations

– Rendering of defined styles!

* (Some features are for Word 2007+ in the current 2.0 release; ODT and legacy Word documents may have simpler features.)

 


 

Registration:

There are store links on this page and in the Try WordLib stack. The license is automatically delivered immediately after you place your order at the eSellerate store, so you can get started within minutes, or order with RunRev for their stellar service. Site license available on request.

(Contact the author if you are interested in licensing for use in a Revolution add-on or development tool, or general programming aid or command-line tool; these are NOT covered by the regular license.)