View Single Post
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default Number from xcel 03 does not appear exactly as is when mergedto w

You have a number of options, including:
a. use DDE to connect to your data source. (In Word, check
Tools-Options-General-Confirm conversions on open, then reconnect to
the data source and choose the DDE option when it is offered. That will
only work for the first sheet in the workbook, and is not a recomended
approach long term
b. Select your data, Edit-Copy in Excel, and Edit-Paste into a Word
document which you then use as the data source. Less likely to work if
you have more columns than the maximum for a Word table, etc. etc.
c. you can use some nested fields in the Word document to turn ".0625"
back to 1/16 etc. For example, if your column is called "f", you could
try something like:

{ =int({ MERGEFIELD f }) } { =16*mod({ MERGEFIELD f },1 } \#"0'/16';;" }

(That would always give you 1/16, 2/16, 3/16, etc., but blank for 0/16).

ALl the {} have to be the special "field braces" that you can insert
using ctrl-F9.

If you need

1/16, 1/8, 3/16, 1/4 etc. you would probably be better off doing
something like this:

At the beginning of your document, put

{ SET F00 "" }{ SET F06 "1/16" }{ SET F13 "1/8" }{ SET F19 "3/16" } etc.
etc. up to { SET F94 "15/16" }

- where "06" stands for "0625" etc.

Notice that 2 digits are enough to distinguish between the different
values but that you need to round up, e.g. "19"instead of "18" for 1875

Then use something like

{ =int({ MERGEFIELD f }) } { REF "F{ =100*(MOD({ MERGEFIELD f },1) \#00 }" }


Peter Jamieson

http://tips.pjmsn.me.uk

On 04/03/2010 17:25, Box Guy wrote:
I have numbers, expressed as 16ths (example 21 9/16) in an xcel file that I
want to show, exactly as is- in 16ths, in a merge doc. However the merge doc
shows decimal. For the example above, it shows 21.5625. Note that the cell
in xcel with the 16ths number is populated copying another cell that starts
as a decimal.