Using WordLib in LiveCode

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
tasdvl9
Posts: 94
Joined: Fri Dec 06, 2013 3:55 am

Using WordLib in LiveCode

Post by tasdvl9 » Thu Jan 23, 2014 10:17 pm

Hello,

I'm looking for any template code which uses the WordLib library in a LiveCode stack aside from the "Try WordLib.rev."

For example, I'd like to select a button which would then import a Microsoft word file and then have the ability
to change the fields.

Does any such code exist?

Thanks!

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Using WordLib in LiveCode

Post by Mark » Mon Jan 27, 2014 12:35 am

Hi,

This should work:

Code: Select all

on mouseUp
  start using "wordlib.rev" -- load the library
  answer file "Choose file..."
  if it is not empty then
    set htmlText of field 1 to htmlTextOfDocument(it) -- import
  end if
end mouseUp
Kind regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Post Reply