Jump to content

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

Recommended Posts

Posted

The only way I have ever done it is the way you described above. I only used it in a situation where there would only be a single section of bold text. It's probably a lot of work, but you could set up a merge field like this:

<<plain01>><<bold01>><<plain02>><<bold02>><<plain03>><<bold03>><<plain04>>[ b]<<bold04>><<plain05>> etc.

Then use as many fields as necessary.

[ April 05, 2002, 01:06 PM: Message edited by: BobWeaver ]

Posted

I think the point was to use filemaker's text functions to find the html tags and parse the text into individual plain and bold text fields that would then be assembled into one merge field.

Posted

I am guessing from Fitch's answer to the post: "Changing format of part of a string" that this can't be done, But I'll ask anyway. I have learnt alot here that I thought couldn't be done.

Let's say 'name', 'sentencetemplate' and 'sentence' are text fields.

Let's say that either through Define Fields or through a script:

sentence is Substitute(sentencetemplate, "**name**", name)

So that if 'sentencetemplate' is "Hi **name**, How are you?", 'sentence' will be "Hi John, How are you?"

Now the question: Is there anyway I can get "John" to print bold (or italics or whatever), when 'sentence' is printed?

The best would be if I could put something like "Hi (:**name**(/:, How are you?" in 'sentencetemplate'. Second best would be if I could put something like "(b)John(/b)" in 'name'. Third best would be to have my 'sentence' calculation be something like:

Substitute(sentencetemplate, "**name**", MakeBold(name))

or

StuffBefore(sentencetemplate,"**name**") & MakeBold(name) & StuffAfter(sentencetemplate,"**name**")

I understand that I could have 'sentencetemplate1st' be "Hi ", and sentencelast be ", How are you?" and put

<<sentencetemplate1st>><<name>><<sentencetemplatelast>> on the layout. But that doesn't work with what else I need to do. I don't know how many **name**'s will be in sentencetemplate. Also I want my print layout to have a single text field which will be filled differently according to which script has filled it.

[ April 05, 2002, 12:54 PM: Message edited by: Drew Cover ]

Posted

quote:

Originally posted by BobWeaver:

I think the point was to use filemaker's text functions to find the html tags and parse the text into individual plain and bold text fields that would then be assembled into one merge field.

For example of how to parse HTML in FM and how to format text in custom way see Mark Osborne's teaching tool Form and Form2 at

database pros

Dj

This topic is 8336 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.