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

x
?
Solved

MERGEFIELD : Word 2010

Posted on 2012-09-08
4
Medium Priority
?
1,993 Views
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.
0
Comment
Question by:mugsinc
  • 2
  • 2
4 Comments
 
LVL 76

Expert Comment

by:GrahamSkan
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.
0
 
LVL 1

Author Comment

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

Accepted Solution

by:
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?
0
 
LVL 1

Author Comment

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

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