Another mailmerge from Excel question

P

Paul - NottsUK

{I'm merging HR data from an Excel spreadsheet into word letters. I've got a
number of date fields that I am merging. Consider you'll always have a start
date for someone and you probably have their first pay rise but you may have
a second, it is less likely you'll have a third one and so on.

I've got the mergefields in a table and am using something like

{MERGEFIELD "fieldnameX" \@ "dd-mmm-yy"}

The dates appear as they should do on the first line of the word table but
on all subsequent lines they revert to number of days since 1/1/1900 ignoring
the formatting.

Does anyone have any ideas what is happening.
 
G

Graham Mayor

Are you saying that where the data fields have no content that 1/1/1900 is
inserted instead?
If that is the case you will have to test for content using a conditional
field e.g.

{IF{Mergefield fieldnameX \@ "yyyyMMdd"} <> 19000101 "{Mergefield fieldnameX
\@ "dd-MMM-yy"}"}

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
P

Paul - NottsUK

Graham,

Thanks, I think I'd got there about the same time you suggested that, via
your web site.

I've been do some further tests by doing copy and paste values into a
seperate worksheet and the issues appear different when the cell contains a
formula and when it is apparently blank. I think this is a one of those
instances where you ask when is a blank cell not a blank cell, when it
contains a formula that resolves to the appearance of blank. I know you can
use =na() but even that doesn't always give you what you you want when the
field ends up in a mailmerge

Thanks for your help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top