Thread: Document Date
View Single Post
  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default Document Date

CREATEDATE may do it if you have the right starting point (probably a
template rather than a document).

But if not, when you get data from the AS400, can you specify a SQL Query
that lists a function like today() as one of the fields, in addition to the
fields you're getting from the data source? (I don't know what facilities
are on offer in AS400-land)

If not, you can probably use the technique described in

http://tips.pjmsn.me.uk/t0004.htm

to insert today's date (e.g. using the date() function) and destroy the
field during the merge.

Ideally you would be able to use just one DATABASE field to return the value
formatted exactly as you want it, but since there's a problem whereby Word
now adds a paragraph mark to the result of a DATABASE field, you'll probably
need either
a. two copies of the same DATABASE field (so you can apply the two separate
formats you are using at the moment) or
b.
{ SET today { DATABASE ... } }
then
{ REF today \@ "d" \*ordinal } { REF today \@ "MMMM yyyy }

etc.

Haven't tried that specific approach, and the DATABASE field won't work
inside tables.

--
Peter Jamieson
http://tips.pjmsn.me.uk

"Chris Stammers" wrote in message
...
Hello,

I am using Word 2002 and I have a problem with the { DATE } field. Our
data
source is an AS400 platform that doesn't contain the date a record was
created therefore I have been using the following: { DATE \@ "d"
\*ordinal }
{ DATE \@ "MMMM yyyy }. This is OK however we have an automatic scanning
facility which is used to recall letters if a customer wants a copy. This
has
to have the original date the letter was produced and unfortunately, the
above field will always show the current days date. Is there a field
switch I
can use to hardcode the date the letters are generated through the merge?
I
have tried CREATEDATE and SAVEDATE; CREATEDATE only ever returns the date
the
document was created (obviously, perhaps). SAVEDATE would be prone to
changing if something in the document changes after it has been opened.
Any
suggestions?

Thanks,
Chris