[Last Call] Learn how to a build a cloud-first strategyRegister Now


MERGEFIELD : Word 2010

Posted on 2012-09-08
Medium Priority
Last Modified: 2012-09-11
i want to format the below text from mergefield to show the values without decimals

"NBT 2.0408%"

i tried the below code, but it does not seem to work

MERGEFIELD  TaxCode \#"#,##0.00;(#,##0.00)" \* MERGEFORMAT

there are strings and numbers on the field TAXCODE. how can i take off the decimal  numbers.
Question by:mugsinc
  • 2
  • 2
LVL 76

Expert Comment

ID: 38379117
Word's fields can't apply numeric formatting to a field with text in it.

You will have to divide the field into a text field and a numeric field in the datasource or query if you want to use numeric formatting on the numeric part.

Of course, it would probably be simpler to remove the unwanted part of the numerics in the datasource.

Author Comment

ID: 38379135
i dont have control of the data, is there anyway i can use an IF Statement to replace the field
LVL 76

Accepted Solution

GrahamSkan earned 1500 total points
ID: 38379161
There is an IF field, but I don't know if any way to use Word fields to split the data.

If you can get read the data with the merge, you should be able to manipulate it, perhaps with a query or by saving it in an intermediate file. What type is the data source?

Author Comment

ID: 38389391
The if field worked. But I couldn't split it. But since I knew the values it worked

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Ever visit a website where you spotted a really cool looking Font, yet couldn't figure out which font family it belonged to, or how to get a copy of it for your own use? This article explains the process of doing exactly that, as well as showing how…
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…
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …

829 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