Solved

How to format multiline numeric merge fields

Posted on 2009-05-19
8
600 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
  • 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
The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

 

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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

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…
Preface: When I started this series, I used the term CommandBars because that is the Office Object class that it discusses. Unfortunately, when Microsoft introduced Office 2007, they replaced the standard Commandbar menus with "The Ribbon" and rem…
In a previous video Micro Tutorial here at Experts Exchange (http://www.experts-exchange.com/videos/1358/How-to-get-a-free-trial-of-Office-365-with-the-Office-2016-desktop-applications.html), I explained how to get a free, one-month trial of Office …
This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …

770 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