Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / March 2005

Tip: Looking for answers? Try searching our database.

Date Field in Merge Document

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Karen Hart - 06 Jan 2005 22:32 GMT
How do I create a form file that upon merging inserts the current date of
the merge, then does not update after that point? In other words, after the
merge is complete, the resulting document's date field should be
automatically unlinked.  I do not want to teach the user to unlink the field
with Ctrl-Shift-F9, because there are several of these date codes throughout
the form file, inlcuding headers and footers, and also I don't want to risk
that the user forgets to unlink the date field.

Thank you in advance.
Karen
Graham Mayor - 07 Jan 2005 06:02 GMT
Use a CREATEDATE field for the date and merge to a new document. The new
document will always show the date of the merge.

Signature

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

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

> How do I create a form file that upon merging inserts the current
> date of the merge, then does not update after that point? In other
[quoted text clipped - 7 lines]
> Thank you in advance.
> Karen
Karen Hart - 13 Jan 2005 21:17 GMT
Thanks so much, Graham. You dah man!
Is there a similar function for the document id code? To insert the new name
and path of the resulting merged document?

> Use a CREATEDATE field for the date and merge to a new document. The new
> document will always show the date of the merge.
[quoted text clipped - 10 lines]
>> Thank you in advance.
>> Karen
Charles Kenyon - 13 Jan 2005 21:53 GMT
You can insert the field for this but realize it won't give a real name
until after the document is saved and the field is updated.
Signature


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.

> Thanks so much, Graham. You dah man!
> Is there a similar function for the document id code? To insert the new
[quoted text clipped - 14 lines]
>>> Thank you in advance.
>>> Karen
Karen Hart - 14 Jan 2005 18:08 GMT
By just inserting the path/filename merge code?

> You can insert the field for this but realize it won't give a real name
> until after the document is saved and the field is updated.
[quoted text clipped - 16 lines]
>>>> Thank you in advance.
>>>> Karen
Graham Mayor - 15 Jan 2005 05:41 GMT
You would have to merge to a new document, save that document then insert
the field. As Charles has indicated the name doesn't exist until the
document is saved and it is not saved as part of the merge process.

Signature

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

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

> By just inserting the path/filename merge code?
>
[quoted text clipped - 41 lines]
>>>>> Thank you in advance.
>>>>> Karen
Karen Hart - 20 Jan 2005 18:42 GMT
Thank you Graham,  that is what I realize.  Because of that, I am trying to
create a form file that will have some kind of automated coding so the end
user does not have to know to do these steps that you outline below after
they save and name the document. It would be ideal if I could code something
in the pre-merged document.  For example, in Corel, the filename/path code
can be inserted pre-merge, and take on the new document name after it is
merged and saved as a new document.

> You would have to merge to a new document, save that document then insert
> the field. As Charles has indicated the name doesn't exist until the
[quoted text clipped - 45 lines]
>>>>>> Thank you in advance.
>>>>>> Karen
Charles Kenyon - 20 Jan 2005 20:22 GMT
It is a field on the header footer AutoText menu or available through Insert
> Field.

You can put the field into your merged document but it will not show a
correct name and path until after the document is saved and the field is
updated. If in a header / footer it will generally be updated when you print
or do a print preview. If in the body, you'll need something that updates
your fields.

I had thought you could put it in the primary merge document before the
merge, but checked when I read Graham's post and was mistaken. Word converts
the field to text during the merge. (The primary way I use mail merge is to
merge to the screen for a single client. I then print and save the merged
document, with active fields. So putting it in the primary merge document
works for me. I realize that most people actually perform a merge for
multiple files.)

It should be relatively simple to put together a processing macro that (1)
performs the merge, (2) saves the result document, (3) inserts the field you
want (which will then be correct when inserted), and then saves the document
again. This could be put on a (floating) custom toolbar for your users to
perform the merge.

The following is the command to insert the field.
   Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, _
       Text:= "FILENAME  \p ", _
        PreserveFormatting:=False

Hope this helps,
Signature


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.

--

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.

> By just inserting the path/filename merge code?
>
[quoted text clipped - 19 lines]
>>>>> Thank you in advance.
>>>>> Karen
Karen Hart - 16 Mar 2005 19:55 GMT
Graham,
I tried that and am getting a strange result.  The resulting merged document
is displaying the date the original merge form was created...not the date
the original merge form is being merged. Does that make sense? In other
words, I changed the form document on Jan. 14 and coded the date to be
CREATEDATE.  Now, every time the form is merged, the resulting date
displayed is Jan. 14.  What am I doing wrong?
Thank you.
Karen

> Use a CREATEDATE field for the date and merge to a new document. The new
> document will always show the date of the merge.
[quoted text clipped - 10 lines]
>> Thank you in advance.
>> Karen
Charles Kenyon - 16 Mar 2005 20:53 GMT
Have your original merge form be a template. Create a new merge form from it
using File>New for each merge.
Signature

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.

> Graham,
> I tried that and am getting a strange result.  The resulting merged
[quoted text clipped - 20 lines]
>>> Thank you in advance.
>>> Karen
Karen Hart - 17 Mar 2005 00:26 GMT
Thank you Charles, but...Since we already have tons of documents set up as
merge files, heavily coded with all kinds of data fields, if statements,
etc., how can we accomplish this date function without going your suggested
route?  We would like to keep all these docs as merge forms rather than
changing them all over to templates.

> Have your original merge form be a template. Create a new merge form from
> it using File>New for each merge.
[quoted text clipped - 22 lines]
>>>> Thank you in advance.
>>>> Karen
Charles Kenyon - 17 Mar 2005 00:50 GMT
Template and merge form are not mutually exclusive types. Save your merge
forms as templates, in an appropriate Workgroup templates folder. When you
want to do a merge, create a new document based on the template (File > New)
and merge to it. Links to your database established in the template will be
maintained.
Signature

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.

> Thank you Charles, but...Since we already have tons of documents set up as
> merge files, heavily coded with all kinds of data fields, if statements,
[quoted text clipped - 29 lines]
>>>>> Thank you in advance.
>>>>> Karen
Karen Hart - 17 Mar 2005 01:23 GMT
Thank you again Charles, but  since I explained that this is not the route
we want to take for a multitude of reasons, that are too numerous to go into
at this time, are you suggesting that there is NO mergedate solution if the
files remain merge files?
Karen

> Template and merge form are not mutually exclusive types. Save your merge
> forms as templates, in an appropriate Workgroup templates folder. When you
[quoted text clipped - 35 lines]
>>>>>> Thank you in advance.
>>>>>> Karen
Charles Kenyon - 17 Mar 2005 07:38 GMT
There is no automatic route I know of for you to take unless you are willing
to change your merge files into templates and create new documents based on
the templates. Once such a new document is created from the template, with
your updated date in it, you can merge it.
Signature

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.

> Thank you again Charles, but  since I explained that this is not the route
> we want to take for a multitude of reasons, that are too numerous to go
[quoted text clipped - 41 lines]
>>>>>>> Thank you in advance.
>>>>>>> Karen
Graham Mayor - 17 Mar 2005 09:04 GMT
The date in the createdate in the merge source document is irrelevant. If
you merge to a new document the date that document is created becomes the
createdate for that document. If the field shows the wrong date select all
(CTRL+A) then update (F9). That should fix it.

Signature

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

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

> Graham,
> I tried that and am getting a strange result.  The resulting merged
[quoted text clipped - 29 lines]
>>> Thank you in advance.
>>> Karen
Karen Hart - 17 Mar 2005 20:02 GMT
Thank you so much for replying, Graham. Coincidentally, I was on your web
site checking it out exactly when your reply came :-)  What a cool web site!
I love it!  And I love that cute little thing that follows my pointer
around!

Anyway, once again, I tried...I insert this into the merge MAIN document:
       {CREATEDATE \@ "MMMMd, yyyy" \* MERGEFORMAT}.

But sure enough, when I merge it, this is what I see:
       August 24, 2000
(This is the date I originally created this merge source document).
(Ctrl-A), (F9) is changing nothing, no matter if I do it before and/or after
merging.
Please help me out of the twilight zone!!

Thanks again,
Karen

> The date in the createdate in the merge source document is irrelevant. If
> you merge to a new document the date that document is created becomes the
[quoted text clipped - 34 lines]
>>>> Thank you in advance.
>>>> Karen
Charles Kenyon - 17 Mar 2005 20:39 GMT
I believe that the merge changes the field to its results, so an F9 after
the merge wouldn't find a field to update.
Signature

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.

> Thank you so much for replying, Graham. Coincidentally, I was on your web
> site checking it out exactly when your reply came :-)  What a cool web
[quoted text clipped - 53 lines]
>>>>> Thank you in advance.
>>>>> Karen
Graham Mayor - 18 Mar 2005 11:41 GMT
This is not going to work :( That's what comes from not testing the
suggestions before posting.

Change the field back to a DATE field, update it, then  merge to a new
document
CTRL+A then CTRL+SHIFT+F9
will fix it.

Signature

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

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

> Thank you so much for replying, Graham. Coincidentally, I was on your
> web site checking it out exactly when your reply came :-)  What a
[quoted text clipped - 61 lines]
>>>>> Thank you in advance.
>>>>> Karen
Greg Maxey - 18 Mar 2005 11:58 GMT
For every lover of that infernal thing there is a hater ;-)

Signature

Greg Maxey/Word MVP
A Peer in Peer to Peer Support
http://gregmaxey.mvps.org/word_tips.htm

> This is not going to work :( That's what comes from not testing the
> suggestions before posting.
[quoted text clipped - 70 lines]
>>>>>> Thank you in advance.
>>>>>> Karen
Graham Mayor - 18 Mar 2005 14:56 GMT
I think you are in a minority of those who comment  :)

Signature

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

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

> For every lover of that infernal thing there is a hater ;-)
>
[quoted text clipped - 72 lines]
>>>>>>> Thank you in advance.
>>>>>>> Karen
Karen Hart - 22 Mar 2005 01:15 GMT
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

> This is not going to work :( That's what comes from not testing the
> suggestions before posting.
[quoted text clipped - 69 lines]
>>>>>> Thank you in advance.
>>>>>> Karen
Graham Mayor - 22 Mar 2005 08:22 GMT
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

Signature

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

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

> 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
[quoted text clipped - 85 lines]
>>>>>>> Thank you in advance.
>>>>>>> Karen
Karen Hart - 24 Mar 2005 19:58 GMT
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

> The user shouldn't have to remember to insert a second page header. Set
> the
[quoted text clipped - 93 lines]
>>>>>>>> Thank you in advance.
>>>>>>>> Karen
Graham Mayor - 25 Mar 2005 09:05 GMT
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.

Signature

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

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

> Graham,
> I already have that in my merge source document.  My question is, how
[quoted text clipped - 109 lines]
>>>>>>>>> Thank you in advance.
>>>>>>>>> Karen
Peter Jamieson - 23 Mar 2005 00:02 GMT
How about

{ QUOTE "{ DATE }" }

?

Peter Jamieson

> This is not going to work :( That's what comes from not testing the
> suggestions before posting.
[quoted text clipped - 69 lines]
>>>>>> Thank you in advance.
>>>>>> Karen
Graham Mayor - 23 Mar 2005 08:13 GMT
That works :)

Signature

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

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

> How about
>
[quoted text clipped - 86 lines]
>>>>>>> Thank you in advance.
>>>>>>> Karen
Karen Hart - 24 Mar 2005 19:56 GMT
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

> How about
>
[quoted text clipped - 77 lines]
>>>>>>> Thank you in advance.
>>>>>>> Karen
Peter Jamieson - 24 Mar 2005 21:00 GMT
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
> Hello Peter,
> I'm sorry I don't understand your reference below { QUOTE "{ DATE }" }
[quoted text clipped - 83 lines]
>>>>>>>> Thank you in advance.
>>>>>>>> Karen
Karen Hart - 25 Mar 2005 19:08 GMT
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?

> It's an example of a "nested field". You can't usually enter them easily
> using e.g. Insert|Field, so...
[quoted text clipped - 100 lines]
>>>>>>>>> Thank you in advance.
>>>>>>>>> Karen
Peter Jamieson - 25 Mar 2005 19:31 GMT
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

> Thank you so much, Peter! It works great, in the header, too! And your
> directions are so clear :-)
[quoted text clipped - 112 lines]
>>>>>>>>>> Thank you in advance.
>>>>>>>>>> Karen
Karen Hart - 28 Mar 2005 22:59 GMT
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

> In this case the date format switch needs to be applied to the DATE field,
> not the QUOTE field, so try
[quoted text clipped - 129 lines]
>>>>>>>>>>> Thank you in advance.
>>>>>>>>>>> Karen
Peter Jamieson - 28 Mar 2005 23:44 GMT
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

> That works beautifully! Thank you so much for all your help, and for your
> very clear directions.
[quoted text clipped - 141 lines]
>>>>>>>>>>>> Thank you in advance.
>>>>>>>>>>>> Karen
Karen Hart - 29 Mar 2005 02:29 GMT
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 :-)

> 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
[quoted text clipped - 160 lines]
>>>>>>>>>>>>> Thank you in advance.
>>>>>>>>>>>>> Karen
Charles Kenyon - 29 Mar 2005 04:27 GMT
ADDIN is a field that you don't need to worry about. AFAIK means as far as
I know.
Signature

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.

> 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
[quoted text clipped - 165 lines]
>>>>>>>>>>>>>> Thank you in advance.
>>>>>>>>>>>>>> Karen
Peter Jamieson - 29 Mar 2005 12:38 GMT
AFAIK=As far as I know.

I don't know the full history of the ADDIN field, but I believe it was
intended to allow third party programs such as Personal information managers
(PIMs) to maintain their private data in a way that Word would not normally
touch. I have read that they are used by the program "Endnote" too. They are
similar to PRIVATE fields which are, or were, used by Word when it opens a
WordPerfect format doc, in essence to save information that it will need
when it saves back to WP format.

See http://word.mvps.org/FAQs/TblsFldsFms/AddInFieldsContent.htm for info on
ADDIN fields. I'm not sure this info. is the last word on the subject.

See http://support.microsoft.com/kb/200318 for further info. on PRIVATE
fields.

Peter Jamieson

> 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
[quoted text clipped - 165 lines]
>>>>>>>>>>>>>> Thank you in advance.
>>>>>>>>>>>>>> Karen
Peter Jamieson - 24 Mar 2005 21:01 GMT
BTW, not sure this will fix your header problem - I haven't tested.

Peter Jamieson

> Hello Peter,
> I'm sorry I don't understand your reference below { QUOTE "{ DATE }" }
[quoted text clipped - 83 lines]
>>>>>>>> Thank you in advance.
>>>>>>>> Karen
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.