We go through this about once a year when we have to reset file names in our templates. And, if we didn't write it down we wouldn't be able to easily figure out how to do it again. It's hidden, or at least not in a very logical place to put it.
First though, to explain what is happening. This behavior occurs because the data is displayed in its native, stored format in Access or Excel. To format merged data, you must format the merge fields in the main Document. If you format the data in the data source, the formatting is not retained when you merge the data into the main Document.
The 'feature', if you want to call it that, which allows the numbers to print correctly is called a numeric picture switch. You format your main Document during the merge process. At the point during your merge when you can see the main document and before the actual merge takes place.... do this:
(1) Right click the field which is being displayed as your long number, choose Edit Field.
(2) In the Field screen, click the "Field Codes" button at the bottom which reveals the advanced field properties on the right.
(3) You should see something in the box similar to this:
MERGEFIELD FieldName
(4) Place the cursor following the FieldName and press the space bar ONE time.
(5) Type the following after the space:
\# $#,###.00
Your final output should look something like this:
MERGEFIELD FieldName \# $#,###.00
Click OK to leave the field editor.
If it's possible for any amounts to be $10,000 or greater, use this for your picture switch:
\# $##,###.00
If it's possible for any amounts to be $100,000 or greater..... well, you get the picture. :D
(edit... why does this silly forum change the letter D on the word 'document' SOMETIMES and not others?)