Date Field in Merge Document

K

Karen Hart

Since there will be a date at the top of the letter, as well as in the
second page header, is there some code I can put in at the end of the merge,
so the end user does not have to remember to do this every time they create
a letter?
Thank you,
Karen
 
G

Graham Mayor

The user shouldn't have to remember to insert a second page header. Set the
second page header up in the document template (or the merge source
document) Word remembers the header settings. Insert a temporary page break,
create your headers then remove the page break - see
http://home.earthlink.net/~wordfaqs/Letterhead.htm

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


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
G

Graham Mayor

That works :)

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


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
K

Karen Hart

Hello Peter,
I'm sorry I don't understand your reference below { QUOTE "{ DATE }" }
Is this a merge field I put in the merge form? If so, how do I insert it?
Thank you,
Karen
 
K

Karen Hart

Graham,
I already have that in my merge source document. My question is, how to be
sure that header as well as the first page date are both fixed after the
merge is complete. :)
Karen
 
P

Peter Jamieson

It's an example of a "nested field". You can't usually enter them easily
using e.g. Insert|Field, so...

Use ctrl F9 to insert a pair of the special field braces {}

Type QUOTE "" in between to give you { QUOTE "" }

Put the insertion point between the "" and press ctrl-F9 to give you

{ QUOTE "{}" }

Type DATE between the inner {} to give you

{ QUOTE "{ DATE }" }

Peter Jamieson
 
P

Peter Jamieson

BTW, not sure this will fix your header problem - I haven't tested.

Peter Jamieson
 
G

Graham Mayor

The header is fixed by having a different first page header and setting the
first and subsequent page headers before you merge. As indicated in my last
post, Word will remember what you have setup when you remove the temporary
page break. Setting up letterheads is explained in more detail at
http://home.earthlink.net/~wordfaqs/Letterhead.htm

The date is a little more complex, but the simplest plan is to use a Quote
field
{Quote {Date \@ "d MMM yyyy"}}
will fix the date as text in the merged document. Change the mask to suit
local date patterns.


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


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
K

Karen Hart

Thank you so much, Peter! It works great, in the header, too! And your
directions are so clear :)
The only thing I can't finess is how to make it print like March 25, 2005
instead of 3/25/05. I experimented with some variations of what Graham
wrote above, but I was unable to make it work. Can I impose on you one more
time for this final step?
 
P

Peter Jamieson

In this case the date format switch needs to be applied to the DATE field,
not the QUOTE field, so try

{ QUOTE "{ DATE \@"MMMM DD, YYYY" }" }

If that does not work, can you let us know what you are seeing?

Peter Jamieson
 
K

Karen Hart

That works beautifully! Thank you so much for all your help, and for your
very clear directions.

Is there anywhere I can read about such other wonderful secret codes
obtained by manually typing commands such as QUOTE between Ctrl-F9 brackets?
I am wondering if all of the power and control of WordPerfect merge codes is
hiding in there somewhere!!! :)

Thank you again, Peter!
Karen
 
P

Peter Jamieson

Almost all of the available field codes are documented in Word Help, usually
near the bottom of the table of contents.The "=" field is usually hardest to
find if you search Word Help. Some field types such as ADDIN are not
documented (AFAIK) but are not usually useful for end users, and others such
as DATA are old field types that are typically updated automatically by Word
if you use them.

I never used WordPerfect very much but my understanding is that the way
data sources and the "merge code language" works in WP is more powerful than
the Word equivalents.

Peter Jamieson
 
K

Karen Hart

Thank you again! What is ADDIN, and what is AFAIK? Since I am not an end
user (I am an MSAccess developer, extracting records from Access and
interfacing/merging with Word merge forms), maybe I will be interested :)
 
C

Charles Kenyon

ADDIN is a field that you don't need to worry about. AFAIK means as far as
I know.
--
Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide

See also the MVP FAQ: http://www.mvps.org/word which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
 

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