Solved

How to format multiline numeric merge fields

Posted on 2009-05-19
8
603 Views
Last Modified: 2012-05-07
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
Comment
Question by:PolymorphLtd
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
8 Comments
 
LVL 46

Expert Comment

by:tbsgadi
ID: 24422371
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
 

Author Comment

by:PolymorphLtd
ID: 24422402
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
 

Author Comment

by:PolymorphLtd
ID: 24422737
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
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

Author Comment

by:PolymorphLtd
ID: 24422753
Even more annoying is that Word2007 doesn't remove them but Word2003 does
0
 

Author Comment

by:PolymorphLtd
ID: 26482945
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
 
LVL 46

Expert Comment

by:tbsgadi
ID: 26482972
It took almost a year but great!
0
 

Accepted Solution

by:
ee_auto earned 0 total points
ID: 32650641
Question PAQ'd, 125 points refunded, and stored in the solution database.
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

There is a feature provided by MS Word that lets you create an Table of Contents for your Word document automatically. To use this feature for other documents there are two steps involved,   1.  Prepare your document for a table of contents (he…
This is written from a 'VBA for MS Word' perspective, but I am sure it applies to most other MS Office components where VBA is used.  One thing that really bugs me is slow code, ESPECIALLY when it's mine!  In programming there are so many ways to…
In this video, we show how to convert an image-only PDF file into a PDF Searchable Image file, that is, a file with both the image (typically from scanning) and text, which is created in an automated fashion with Optical Character Recognition (OCR) …
This video walks the viewer through the process of creating Hyperlinks for the web and other documents. Select the "Insert" tab: Click "Hyperlink":  Type "http://" followed by a web address to reference a website or navigate to a document to ref…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question