Lasso Soft Inc. > Home

  • Articles

Quick iWork Pages and Microsoft Word Style Formatting

Taken from the tip of the week for June 22, 2007 this article discusses how to export text from Lasso so that it can be easily formatted in Apple's iWork page layout application Pages or Microsoft Word. This tip was contributed by Rich Fortnum.

Introduction

From time to time I have clients that need to manipulate large amounts of information for programs, syllabus' and other large documents. As a consultant, one of my main goals is to save them time in this area using Lasso, for two reasons. First, it places a heavier reliance upon myself as a solutions provider, and it also makes them happy by automating such a process. This alleviates a boatload of time usually spent modifying long mundane lists of text, while minimizing or eradicating the errors overseen by bored humans.

When you use Lasso to export records for print reasons, it can be exported with conditionals ([if], [case], etc.) so that it's much more dynamic than rows of fields. As an example, you can group information by date, or by any chosen field. While presenting such information in a browser, we can use CSS in order to set styles for screen and print. However, when we export the resulting text using [file_write], we run into a styles issue. How do we carry a system of styles from Lasso into a word processor, such as Tex-Edit or Pages? Being able to solve this transition would allow us to use Lasso to generate styled text for external manipulation in a multitude of applications.

Well there is a way. Just like CSS and traditional HTML (<font color="red">), markup is the answer. In fact, word processors just use hidden markup we cannot see. This is how I have completed previous ways of exporting hidden markup tags in order to markup text for RTF applications. Rich Text format is like normal text on steroids. Usually you can export to an RTF file, but it's a difficult system to master, and eventually you have to apply styles in the word processor anyway. The original RTF markup was so that the user didn't miss a change in style.

Exporting

When exporting, create a set of single sided markup tags. I use bullet points, which are Option-8 on the Mac. I use a single bullet point for Title, double bullet points for Heading, and triple bullet points for Sub-Heading. I place them so that they are directly in front of the line I want to modify. Now, it is important to know that this system places style for a whole line, not individual text. Your exported text will then have lines with embedded bullets on lines where you want them to be modified.

Example:

<font face="Times" size="+1">•</font>Country: Canada

<font face="Times" size="+1">••</font>Province: Ontario

<font face="Times" size="+1">•••</font>City: Toronto

text here text here text here...

<font face="Times" size="+1">•••</font>City: Barrie

text here text here text here...

<font face="Times" size="+1">••</font>Province: British Columbia

<font face="Times" size="+1">•••</font>City: Vancouver

text here text here text here...

<font face="Times" size="+1">•••</font>City: Victoria

text here text here text here...

Importing

Open the file in Page, and perform a Command-F, which brings up the Find dialog box. Click the Advanced Tab, which allows you to modify the Replace function. Enter a single bullet point (Option-8) in the Find field, while leaving the Replace field blank, while choosing Style: Title. Choose Replace All. All of your marked up text are now titles. Don't worry that your headings and sub-headings are now titles, as that will change. Repeat the same function, using two bullet points for heading, and then three bullet points for sub-heading. With this example, you have to perform it in this progression, as you can see a single bullet point includes those with three bullet points. Perhaps a more specific markup system would help improve the method in which you choose styles. You might want to design a system for exporting text for eventual styling.

So what if you want to go into MS Word? Pages can export into Word format, so this application can function as a gateway. Or, you can perform the same type of replace in Word. In this application, make sure to enter the Replace Field, then modify the Style... in the drop-down menu below.

After all styles have been applied, you then replace your bullets with nulls, and you have a finished document. The number of replaces you have to make on a single document = (2 * Style Replacement Count). For example, if I have to replace 4 styles, I have 8 replace functions to perform manually, the first 4 for applying the styles, then the last 4 to take out the markup. In my case, I need only 5 manual functions, the last taking out all bullets.

About the Author: Rich Fortnum likes biking, coding, business, and beer. http://viaduct-productions.com

Author: Rich Fortunm
Created: 22 Jul 2007
Last Modified: 16 Mar 2011

Comments

No comments found
You must be logged in to comment.

Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.

LassoSoft Inc. > Home

 

 

©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft