View Single Post
  #2   Report Post  
Posted to microsoft.public.mac.office.word,microsoft.public.word.mailmerge.fields
Peter Jamieson
 
Posts: n/a
Default Format Fractions in Mail Merge.

Let me preface that by saying that I have never attempted to bring
formatted
fractions from Excel to Word in Data Merge. However, my understanding of
the problem is that Data Merge sends data from source to destination as
plain text. Formatting is stripped, and Word does not have a "fractions"
numeric picture switch like Excel does, so there is no way to get them
from
Excel to Word.


As far as I can tell (Ii'm not a regular Mac Word user) this is correct, at
least in Mac Office 2004 on MacOSX. In Word 95 using the default connection
method (DDE) the characters seen in the Excel sheet would have come across,
i.e. if you entered 1/2, you would see 1/2. If you are able to add
formatting in Excel to make 1/2 look like
1
_
2
that won't come across in any version of Word as far as I know - In that
case, you could try
a. copying/pasting the Excel data into Word (this probably won't work if
you have more than 63 or 64 columns)
b. using that Word document as the data source
c. if your fraction column is called "fraction", use { REF fraction }
instead of { MERGEFIELD fraction } in the mail merge main document. This is
an undocumented feature so it would be unwise to rely too much on it, but it
does appear to work in Mac Word as well as the Windows version.

If you just need 1/2, 1/3 etc. you can either
a. use two columns as John suggests and use
{ MERGEFIELD numerator }/{MERGEFIELD denominator }
in your mail merge main document or
b. format the column as text in Excel - if you try to format the existing
column, Excel will just convert the fractions, but if you re-enter the
values, they should "stick". You may also be able to use a formula to
reference the fraction data from a column formatted as text.

John's suggestion for formatting using an EQ field should work because the
EQ field /is/ preserved in the output, at least if you merge to a new
document. When using EQ fields it is worth bearing two things in mind:
a. EQ was "deprecated" a long time ago. It may have been reprieved since,
but if for example you double-click on an EQ field, Word will convert it
into an Equation Editor field or the Mac equivalent, and this will change
the formatting
b. unlike most other field types, white space inside the closing brace of
an EQ field is significant, and will result in white space in your output.

If you do end up typing in separate numerators/denominators or fractions in
cells formatted as text, bear in mind that Excel will allow 2/4, whereas in
a field formatted as a fraction, it will convert that to 1/2.

Peter Jamieson

"John McGhie [MVP - Word and Word Macintosh]" wrote in
message ...
Hi Kerry:

The simplest thing I can suggest is "convert your fractions to decimals".

Let me preface that by saying that I have never attempted to bring
formatted
fractions from Excel to Word in Data Merge. However, my understanding of
the problem is that Data Merge sends data from source to destination as
plain text. Formatting is stripped, and Word does not have a "fractions"
numeric picture switch like Excel does, so there is no way to get them
from
Excel to Word.

I hope I am wrong: I have cross-posted this message to the group that
specialises in Data Merge, so check back on Monday to see if anyone knows
how to do this. Data Merge is a specialist area! And we need to be aware
that the advanced VBA functions they have on the PC to deal with these
sorts
of things are not available in Mac Word. (It's Word 97-level VBA,
guys...)

So, somehow you have to represent your data in a form that can be
described
in plain text.

What you "could" do is add two columns in Excel that expresses the
fractions
numerator and denominator as plain text: so you would find 11 | 16 or
24 | 32 in those two columns. That *will* come across.

But once you get the data into Word, you would then have the problem of
converting the text data back into formatted fractions. Since Word
doesn't
HAVE formatted fractions, this involves an Equation field.

Look up the Help for the EQ field. For example, { EQ \f(11,16) } will
display:
11
___
16

So if you had {EQ \f({ MERGEFIELD numerator },{MERGEFIELD denominator } }
in
your main document, it might work. You would have to format the font to
be
small enough so that it would not look silly (start with half the point
size
of the surrounding text).

I am sorry, I cannot remember whether the Data Merge operation passes
field
codes from the Main Document to the Output Document. I suspect it
doesn't.
If that is the case, you need to bring the EQ field into the output
document
as text. In other words, "type" the OUTER set of curly braces in the Main
document.

Then complete your merge and run a macro to convert the typed EQ fields
into
"real" EQ fields. This is, barely, possible. But it's weeks of
programming
unless you know AppleScript *really* well. If you are interested in this
approach, get back to us here. If I hunt around, I think I have a VBA
example that creates fields from plain text. But be warned, this is *not*
a
simple operation. At least, it wasn't for me :-)

Sorry!

On 18/3/06 9:57 PM, in article , "Kerry
O'Shannessy" wrote:

Using Excel as Data source, when I merge data to word, I loose my
formatted
fractions. No explicit Field switches that I can see for setting
fractions.

Program has been working fine on a PC. Have been using Office 95 but
after
researching Macintosh, decided to upgrade in this direction.

And Yes, no Fractions is a problem. There must be a way, can somebody
help.

Mike



--

Please reply to the newsgroup to maintain the thread. Please do not email
me unless I ask you to.

John McGhie
Microsoft MVP, Word and Word for Macintosh. Consultant Technical Writer
Sydney, Australia +61 (0) 4 1209 1410