Using Excel as data source

C

CWH

I am using Office 2003

When I use an Excel file as my data file, is there any way that I can get
dates to appear as 1st August, with the "st" in superscript. It is in that
format in Excel but when I mailmerger the data the format is lost. Is there
some way to format that field in Word?
 
C

Cindy Meister

Hmmm. The "simplest" answer would probably be to use a DDE connection to
Excel so that the data comes over the link exactly the way it looks in Excel.
That type of connection won't always work in later software versions, but if
it does for you, then that will be simplest. Activate "Confirm conversions on
open" in Tools/Options/General, then link to the Excel file (again).

Other than that, you could conceivably do this using some fancy footwork in
the Mergefield codes. Word doesn't provide any formatting switch for
displaying a date with "st". But it does provide switches that will change
plain ordinals into cardinals. However, you may not be able to achieve the
superscript.

{ MERGEFIELD "BirthDate" \@ "d" \* Ordinal } { MERGEFIELD "BirthDate" \@
"MMMM" }

Alt+F9 to toggle the field codes on/off.

-- Cindy
 
C

Cindy Meister

As I wrote in my original reply, I doubt that you're going to find anything
that will do that.

If you really need the superscript, then you're probably going to have to
run a maco over the mail merge result...

-- Cindy
 
G

Graham Mayor

As you mentioned earlier, some fancy footwork can achieve this, and there
are some suggestions at
www.wopr.com/cgi-bin/w3t/showthreaded.pl?Number=249902

{QUOTE{DATE \@ d}{IF{=(mod({DATE \@ d},10)<4)*(mod({DATE \@
d},10)<>0)*({DATE \@ d}<>11)*({DATE \@ d}<>12)*({DATE \@ d}<>13)}= 1
{=mod({DATE \@ d},10)-2 \# rd;st;nd} th} { DATE \@ "MMMM, yyyy" }}

with superscript applied to 'rd;st;nd th' should do the trick

Alternatively

{QUOTE{DATE \@ d}{IF{=(mod({DATE \@ d},10)<4)*(mod({DATE \@
d},10)<>0)*({DATE \@ d}<>11)*({DATE \@ d}<>12)*({DATE \@ d}<>13)}= 1
{=mod({DATE \@ d},10)-2 \# rd;st;nd} th \* Charformat} {DATE \@ "MMMM,
yyyy"}}

with 'IF' formatted as superscript should achieve the same thing

Substitute each incidence of DATE for the Mergefield that contains the date.


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


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

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