Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

How do I get text with standard spacing into a field with custom spacing without losing std spacing?


This topic is 5827 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted (edited)

Edit: Changed title. Overall question is - can I get text with standard line spacing into a field that has custom line spacing, with that section of text retaining standard line spacing? Every method I've found of getting text into a field has it adopt the field's line spacing.

Or, to put it another way - How can I make a letter template that has different line spacing in different sections, (just as I could with any basic word-processing program), with it all still being in one field?

------------------

Hi folks - I 'm trying to create a form letter that has data auto-inserted, and also formatted with line spacing varying throughout the text. Specifically, the letter takes on something like this format:

Addressee,

Address.

[half line space here]

Date

[half line space here]

Dear Addressee,

[half line space here]

Tab Tab Re: This Person

Tab Tab Person's date of birth

[half line space here]

Text body of letter, with a half-space between each para

Yours sincerely,

[variable number of spaces]

My Name,

My Position.

So you can see this whole format effectively has a default of half line spacing after each para, but the Name & Address section have no extra spacing after each 'para' (since each line is defined as a paragraph, since each line ends with a return), no extra between Person and Person's date of birth, and no extra between My Name and My Position.

I've been able to set it up as the whole field having a half-line space after each para, but I can't see how to format the exceptions as having different spacing. I have been able to set those exceptional text areas as separate fields having zero extra spacing, formatted just right, and then scripted to be inserted into the new field - but the text adopts the text field's line spacing instead.

I can see how to use calculation functions to format the text sections as bold, italic, etc, but I can't find any function that allows me to set line spacing.

I had thought of doing merge fields, with the text field just showing the main text, which is all spaced consistently. Trouble is, I sometimes need to change the font size of the entire letter, to fit it all on one page - easy to do with the text that's in the text box, but fiddly (or impossible?) to do to the text from the merge fields.

So this is kind of bamboozling me - I figure the best would be to have one big text field, formatted as having a half line after each para, with a script to enter default (merged, calculated) text (with STANDARD spacing) upon record creation, with me then just typing the main text in the middle. But not being able to enter that initial text with a different line spacing is stumping me.

So - can I do it? (bearing in mind I'm a relative newbie). Or should I be doing it with several different sliding text fields, each formatted with appropriate spacing? Or should I be using merge fields, with some way of modifying their font size as needed?

Edited by Guest
Another clarification
Posted

So, it seems I have a knack for wanting to have FMP do things it just can't do. After 50 people viewing and nobody being able to offer suggestions, it seems likely that FMP offers no way to script or calculate line spacing.

Ah well - at least I know it's not just me not being able to figure it out. Thanks for looking!

Posted

If I'm reading this correctly,

The linespacing is done on the layout.

Select the file, Menu >> Text Format >> Paragraph (button lower left)

Then choose Line Spacing and change to what you want.

HTH

Lee

Posted

Thanks, but that's not what I'm asking.

I can see how to set the para spacing for the entire field (which is what you've just suggested). The point is, I don't want every para to have the same format, and I can't see a way to script that.

For example - The body of the letter looks good with some space between each para. A whole line is wasteful of space (I need to get the entire letter on one page, so space is at a premium). On word processors, I set the paragraph format of the body of the text as having 0.5 lines after each paragraph, and that's great. So that's what I'd set the paragraph spacing as for the field.

But the Address technically comprises several paras, as each line has a return after it - and it looks funny if it has the 0.5 line space after each line. Traditionally it is formatted as if it consists of one single paragraph - that is, zero spacing after each 'para' (line).

So, I can also see how to select those lines and MANUALLY override the default spacing to being zero after the paragraph, and it will come out looking good. And maybe that's what I need to do - just format every single letter manually. But of course I'd rather be able to script it - I mean, that's what FMP is all about.

But I can't find any command to control line spacing. I can insert text from another field that has been formatted with zero spacing after each para, but on insertion it adopts the default spacing of the new field. I can have a separate field for the address, formatted with zero spacing after para, and then set to slide and contract - but that starts causing problems with the large text field then pushing the body report off the bottom of the page and on to a new one (the text is mostly in the subsummary part, with the body/report being a list of "copies to" addresses).

It's easy to set up on any word-processing program. I know FMP isn't a word processor, but it seems to allow scripting of so many aspects of formatting that I was surprised that I don't seem to be able to script paragraph spacing. If anyone can point me to a script step or function that allows control of paragraph formatting I'd be grateful.

Posted

You should use merge fields for this. If you want to override font size for specific fields, you can do so by modifying the field's data, using the TextSize() function.

Posted

Go to http://www.databasepros.com/FMPro

and do a search for Custom Letters

HTH

Lee

Posted (edited)

Conditional formatting (FMP 9 and later only) might also be useful.

Edited by Guest
Posted (edited)

Go to http://www.databasepros.com/FMPro

and do a search for Custom Letters

HTH

Lee

Thanks, but the link gives me an error message. When I get into the site proper and search, it gives me four hits, all of which are ads for products for sale, rather than any actual help.

[edit] I tried "Custom Form Letters" and it gave me some good stuff. Thanks, looks like a great resource! The solutions are rated three coffee cups (most advanced), so I have to admit that's a little intimidating for me, :) but I'll give them a crack!

Edited by Guest
Posted

You should use merge fields for this. If you want to override font size for specific fields, you can do so by modifying the field's data, using the TextSize() function.

I thought so to, and had a good crack at it, but ended up in a mess. Maybe I need to give it another go.

Where I came unstuck was:

1) As I said before, it's crucial that I can fit the whole letter on one page. When I get a long one, I sometimes need to reduce the font size to fit everything on. That was easy to do with the text in fields, but I couldn't see any way to do it with the text that had been put there via merge field - so I ended up with the merge fields' text stuck in a larger font than the rest of the letter. Looked awful. I'm not sure how I could apply the TextSize function to the merge field though - could I?

2) The fact that merge fields won't expand, so they have to be set such that they are large enough to show the largest possible merged text. That meant that the combination of those fields at maximum potential size, combined with the text field at maximum potential size, pushed the 'Body' part of the report (with the "Copies To" addresses) on to a second page. Although the fields were set to slide up, I couldn't seem to get the Body part to slide back on to the first page again. (Is it possible to do that?) I thought maybe I could overlap them, but that was a disaster!

If I could get past those two issues, it would work. Actually, I did get past the first one by using lookup fields instead, so that the text would be editable and I could change the font size easily - used a global field for font size so I could change that number and it would change the font in all of the various fields. But the sliding issue stumped me, because again every field needed to be maximum potential size.

So really, I guess if I could just get the body part to slide back, I'd be set!

Posted

Conditional formatting (FMP 9 and later only) might also be useful.

I love conditional formatting! But it doesn't seem to have an option to change paragraph spacing. :)

Thanks for the suggestion though!

Posted

So really, I guess if I could just get the body part to slide back, I'd be set!

Aha! With a bit more fiddling I managed to get it to slide back to the first page. Success! :)

So, I think I can take it from there, and if I get stuck I'll have a look at the DatabasePros solutions. Thanks all! Sometimes all I need is just a simple nudge back on to the right path. :)

Posted

1. If you apply TextSize() to the data itself, it will override anything you have done on layout level.

2. 'Also reduce the size of the enclosing part' is an option you get when setting sliding.

This topic is 5827 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.