Reply
 
Thread Tools Display Modes
  #1   Report Post  
Graham Blundell
 
Posts: n/a
Default How do I insert and format part of a data field in a Word document

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?
  #2   Report Post  
Cindy M -WordMVP-
 
Posts: n/a
Default

Hi ?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 :-)

  #3   Report Post  
Graham Blundell
 
Posts: n/a
Default

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.

"Cindy M -WordMVP-" wrote:

Hi ?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 :-)


  #4   Report Post  
Graham Blundell
 
Posts: n/a
Default

I made a mistake - the command I'm using is {DOCVARIABLE}, not {DATAFIELD}.

"Graham Blundell" wrote:

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.

"Cindy M -WordMVP-" wrote:

Hi ?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 :-)


  #5   Report Post  
Cindy M -WordMVP-
 
Posts: n/a
Default

Hi ?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.


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?



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 :-)

Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Copying a word table into another word document mszingy Microsoft Word Help 1 November 23rd 04 10:15 PM
How do I convert a cd in word perfect to microsoft word greylady Microsoft Word Help 1 November 23rd 04 07:03 PM


All times are GMT +1. The time now is 04:59 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"