How do I insert and format part of a data field in a Word document

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a data field that could contain entries such as D112904 or A112904,
meaning "Deleted 11/29/04" or "Added 11/29/04". I can use an IF statement to
test for D* or A* and insert "Deleted" or Added" but how do I format the
date?
 
Hi =?Utf-8?B?R3JhaGFtIEJsdW5kZWxs?=,
I have a data field that could contain entries such as D112904 or A112904,
meaning "Deleted 11/29/04" or "Added 11/29/04". I can use an IF statement to
test for D* or A* and insert "Deleted" or Added" but how do I format the
date?
Are we talking about mail merge, here? Or something else? Version of Word?
What's the data source?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)
 
It's not a mail merge. I'm using the {DATAFIELD} command to extract
information from a DBF file (via a series of macros written by the insurance
agency management system vendor to interface their databases with Word). I'm
using Word 2000. I can use these data fields in any Word fields, such as
{IF}, {=}, {QUOTE}, etc.
 
Hi =?Utf-8?B?R3JhaGFtIEJsdW5kZWxs?=,
It's not a mail merge. I'm using the [{DOCProperty} field] to extract
information from a DBF file (via a series of macros written by the insurance
agency management system vendor to interface their databases with Word). I'm
using Word 2000. I can use these [docProperty] fields in any Word fields, such as
{IF}, {=}, {QUOTE}, etc.
Can you get the macros to drop the D/A and the data numbers in separate documnent
properties? If you can, then you can turn the numbers into a date like this:

{ Quote { DocProperty test \# "00–00–00" } \@ "dd-MMM-yyyy"}

(IMPORTANT: The - between the 00 above is Ctrl+minus on the numeric keypad)

There would be no problem, of course, turning D or A into Delete and Add using an
IF field.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply in
the newsgroup and not by e-mail :-)
 
Back
Top