Revolution & MS Word Question

J. Landman Gay jacque at hyperactivesw.com
Wed Mar 8 13:06:43 EST 2006


Dave Hauge wrote:
> To whom it may concern,
> The application I am thinking of building is a sales order entry app that
> will have multiple drop down windows associated with corresponding text
> boxes (see attached). Is it possible with the Revolution Studio product to
> tie a MS Word "bookmark" to each of the text boxes so within the application
> I can click a button and have the app launch MS Word and dump the content of
> each of the text boxes into the corresponding bookmark fields in a
> pre-formatted Word template (i.e. the Word document would look very similar
> to the app input)? Or is there a more efficient way to do this?

One good way to do this is to create the Word template first, and insert 
placeholders for each item that you will later fill with actual data. 
For example, put something like "***NAME***" in the place where a name 
will go, or "***TOTAL***" in the place where a sum total will go. Save 
the file. If you want, you can store the file inside a custom property 
in your stack so that it doesn't have to reside on disk.

Then in Revolution, you open the file (or put the custom property into a 
variable) and use the "replace" command to replace your placeholders 
with actual values:

   replace "***NAME***" with tName in myTemplateFile

Once that is done, save the file to disk under a new name, and then use 
the "launch" command to open the file with MS Word.

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com



More information about the Use-livecode mailing list