0

I have a fieldfunction that formats a given number (price) from an excel table.

i.e.:

Fieldname = FieldName & " \# #.##0,00 USD"

It works, but if the value is less than a thousand, the hashes and the point are read as spaces.

How can I remove or prevent the spaces to show up in the word file?

Deduplicator
  • 44,692
  • 7
  • 66
  • 118
BobLee2km
  • 11
  • 2
  • It's pretty hard to understand how your code could work at all. What is in "Fieldname". Why would concatenating "Fieldname" with the string " \# #.##0,00 USD" do anything useful? –  Feb 22 '16 at 23:13

1 Answers1

2

Too many # in format..try this:

 Fieldname = FieldName & " \# #.#0,00 USD"

Just for further clarification, I didn't really know how the code above used in mergefield by questioner..usually formatting mergefield look like this:

 {MERGEFIELD  ANum \# "#.#0,00 USD"}
Susilo
  • 816
  • 8
  • 17