View Single Post
  #9  
Old February 10th, 2009, 02:20 AM posted to microsoft.public.word.tables
Suzanne S. Barnhill
external usenet poster
 
Posts: 31,786
Default formatting dates

Okay, in this case you want these fields across the table (the numbers are
the cells):

1. { IF { MERGEFIELD Kid1 } "" { MERGEFIELD Kid1 } }

2. { IF { MERGEFIELD Kid1 } "" "Birthdate:" }

3. { IF { MERGEFIELD Kid1 } "" { MERGEFIELD BdaykK1 } }

It sounds as if you may not need the IF fields in (1) and (3), but you
definitely would for (2). You would then repeat these three cells for each
Kid row. Each field (pair of braces) must be inserted using Ctrl+F9 with the
exception that you can use the Insert Merge Fields button to insert the
merge fields if you like.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org

"Wiersma7" wrote in message
...
Actually I want to do this with a non merged cell content. I have 'Kid1'
as a merged field all the way through 'Kid7". That is the largest number
of children in a family of the church. Most families, however, have 1 - 4
children. I need to have the label 'Birthday:' before each birth date of
each child (as well as the adults). What I want to happen is:

1. If I have no data or the adult does not want his/her birthdate
published, I do not want the label 'Birthdate:' to appear
before an empty cell/field.

2. I do not want the label 'Birthdate:' to appear when there is no
child name/birthday field info.

For instance: my table has 3 columns:
John Birthdate: January 1
Sally Birthdate: February 1
Kid3 Birthdate:
Kid4 Birthdate:
Kid5 Birthdate:
Kid6 Birthdate:
Kid7 Birthdate:

The Kid3 - 7 fields will be blank because they only have 2 kids. The
Birthday fields will be blank for same reason. The text/label 'Birthdate:'
however is static. I need the label/text to disappear.

I tried putting { IF { MERGEFIELD BdaykK3 } = "" ""} in the 'Birthdate:'
cell, but all I get is MERGEFIELD.

Is this a possibility or am I going to have to do it manually? (really
need a database, I know - but not in budget right now).
Thanks for even taking the time to figure out what I just typed
wiersma7


"Suzanne S. Barnhill" wrote in message
...
Yes, you need an IF field for this. Although Word makes it relatively
easy to insert IF fields in merge documents (using the Insert Word Field
button), it makes it quite difficult to actually insert merge fields in
them, so it's usually easier to create them from scratch.

1. Press Ctrl+F9 to insert a field, which will be represented by two
braces around two spaces, with the insertion point in the center.

2. Between the braces type IF, then use the keyboard and the Insert Merge
Field button to create the following field:

{ IF { MERGEFIELD BdayA1 } = "" "" "{ MERGEFIELD BdayA1 }" }

Alternatively, you can use:

{ IF { MERGEFIELD BdayA1 } "" "{ MERGEFIELD BdayA1 }" }

The first tells Word, if the data field is blank, to insert nothing,
otherwise to insert the merge data. The second tells Word to insert the
merge data if the data field is not blank.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org

"Wiersma7" wrote in message
...
Yay! It makes sense now. Thanks so much!

Also, is there way to have a conditional rule (?) to only print the
text:
'Birthday:' if there is a date in the date field?
Below is the simple table (obviously I'm making a directory - for my
church):

«Adult1»
Birthday:
«BdayA1»

Cell:
«CellA1»

Email:
«EmailA1»

Anniversary:
«Anniversary»






Thanks so much for all of your help!
wiersma7


"Suzanne S. Barnhill" wrote in message
...
You press Alt+F9 to display the field code of your merge field (such as
«BdayA1», which will show { MERGEFIELD BdayA1 }) and add the switch to
that field.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org

"Wiersma7" wrote in message
...
The table has merge fields from an Excel spreadsheet. I understand the
premise of what the [below address: http:
//www.gmayor.com/formatting_word_fields.htm] is about - but I'm not
sure how to incorporate that into my table. Do I add the switch as a
field to the spreadsheet? To the table? That doesn't seem to work. I
guess I'm asking if you can simplify it for me. I would like to change
the format of 01/01/09 to January 1. (btw - I do know how to do it in
Excel )

Also, is there way to have a conditional rule (?) to only print the
text: 'Birthday:' if there is a date in the date field?
Below is the simple table (obviously I'm making a directory - for my
church):

«Adult1»
Birthday:
«BdayA1»

Cell:
«CellA1»

Email:
«EmailA1»

Anniversary:
«Anniversary»





Thanks very much for your help so far,
wiersma7


"Suzanne S. Barnhill" wrote in message
...
If the table was created via a mail merge, you can add a numeric
picture switch to the merge field to constrain the display (see
http://www.gmayor.com/formatting_word_fields.htm). Alternatively, you
can link to Excel using DDE instead of OLE DB, which will preserve
the native Excel formatting.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org

"Wiersma7" wrote in message
...
I have a table that has birthday dates. The info in the table was
imported from Excel with the dates formatted as 'mmmm dd'. However,
they imported as I entered them: mm/dd/yy. I don't want the years to
show. How can I format these dates in my table to reflect only the
Birth Date? (rather than going through each record)
Thanks,
wiersma7