• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 609
  • Last Modified:

How to format multiline numeric merge fields

Hi there,

I have a field that contains multiple dates on separate lines. When this contains only one date, my merge field works fine with the following...

{MERGEFIELD "TheVals" \#"£0.00"}
which returns £89.75

but if there are more than one value in there, it does something very odd.....

If the merge field contains...
12.99
1.50
2.50

...what it returns is....
£16.99

So the formatting worked, but it totalled everything.

If I have the merge field in there without the formatting formulae, it just returns the values one under the other thus....
12.99
1.50
2.50

Any ideas would be gratefully received!

Cheers,
Matt
0
PolymorphLtd
Asked:
PolymorphLtd
  • 4
  • 2
1 Solution
 
tbsgadiCommented:
Hi,
You won't be able to do the formatting in the document.You'll need to add the "£" sign to the data.

Gary
0
 
PolymorphLtdAuthor Commented:
Hi there,

Annoyingly, the pound sign is in the data, Word strips it out (and any trailing zeros after the decimal point) which is why I've had to put the formatting formula in.

My datasource is an HTML file containing a table

Cheers,
Matt
0
 
PolymorphLtdAuthor Commented:
eg. In the datasource, I've got the following...

<TD>£1000.00<br>£0.00<br>£25.00<br>£333.33<br>£33.33<br>£65.50<br>£120.00<br>£18.52<br>£18.52<br>£18.52</TD>

Word correctly interprets it as a multiline value but then insists on removing the pound signs and the trailing zeros
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 
PolymorphLtdAuthor Commented:
Even more annoying is that Word2007 doesn't remove them but Word2003 does
0
 
PolymorphLtdAuthor Commented:
Just as a follow up to this - I think we finally fixed it by putting a space between the pound sign and the number in the data i.e. "£ 1200.00" and Word kept it - without the space, Word stripped it
0
 
tbsgadiCommented:
It took almost a year but great!
0
 
ee_autoCommented:
Question PAQ'd, 125 points refunded, and stored in the solution database.
0

Featured Post

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now