Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Arden Arden is offline
external usenet poster
 
Posts: 8
Default VBA macro - Mailmerge date - for today and for history

I am working with mailmerge documents which must print today's date in the
letter. A copy of the generated file also must be saved as an historic
archive of what was printed today, retaining the generated date even when
being viewed tomorrow.

I had started with Today and realized that it recalculates each time the
document is opened. No good.

So then I built the document with SAVEDATE and it seems to work as long as I
manually run the merge from within the document.

The desired goal, however, is to use a VBA macro to run the merge and then
copy and store the generated file in a specific directory. Though the
SAVEDATE works within the manual merge process, the macro's execution of the
merge generates a date before today...?

Any advice?

Thanks.
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default VBA macro - Mailmerge date - for today and for history

Save the mail merge main document as a template and use a CREATEDATE field
for the date. When a document is created from the template, the date that
is displayed will be the date on which the document is created.

--
Hope this helps,

Doug Robbins - Word MVP

Please reply only to the newsgroups unless you wish to obtain my services on
a paid professional basis.

"Arden" wrote in message
news
I am working with mailmerge documents which must print today's date in the
letter. A copy of the generated file also must be saved as an historic
archive of what was printed today, retaining the generated date even when
being viewed tomorrow.

I had started with Today and realized that it recalculates each time the
document is opened. No good.

So then I built the document with SAVEDATE and it seems to work as long as
I
manually run the merge from within the document.

The desired goal, however, is to use a VBA macro to run the merge and then
copy and store the generated file in a specific directory. Though the
SAVEDATE works within the manual merge process, the macro's execution of
the
merge generates a date before today...?

Any advice?

Thanks.


  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
macropod[_2_] macropod[_2_] is offline
external usenet poster
 
Posts: 2,059
Default VBA macro - Mailmerge date - for today and for history

Hi Arden,

In your mailmerge main document, simply embed the DATE field in a QUOTE field. To do this, select the date field, press Ctrl-F9 to
embed it in another field and type 'QUOTE' inside the left field brace. You should see something like:
{QUOTE1 December 2009}
Press F9 to update the field, then run your mailerge. The output document will now have today's date as plain text, rather than as a
DATE field.

--
Cheers
macropod
[Microsoft MVP - Word]


"Arden" wrote in message news
I am working with mailmerge documents which must print today's date in the
letter. A copy of the generated file also must be saved as an historic
archive of what was printed today, retaining the generated date even when
being viewed tomorrow.

I had started with Today and realized that it recalculates each time the
document is opened. No good.

So then I built the document with SAVEDATE and it seems to work as long as I
manually run the merge from within the document.

The desired goal, however, is to use a VBA macro to run the merge and then
copy and store the generated file in a specific directory. Though the
SAVEDATE works within the manual merge process, the macro's execution of the
merge generates a date before today...?

Any advice?

Thanks.


  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Arden Arden is offline
external usenet poster
 
Posts: 8
Default VBA macro - Mailmerge date - for today and for history

Doug -

Thanks for the counsel. I will re-test this. If I remember correctly from
last week's quick analysis, however, it was using the CREATEDATE of the
Template not necessarily the merged document.

Arden

"Doug Robbins - Word MVP" wrote:

Save the mail merge main document as a template and use a CREATEDATE field
for the date. When a document is created from the template, the date that
is displayed will be the date on which the document is created.

--
Hope this helps,

Doug Robbins - Word MVP

Please reply only to the newsgroups unless you wish to obtain my services on
a paid professional basis.

"Arden" wrote in message
news
I am working with mailmerge documents which must print today's date in the
letter. A copy of the generated file also must be saved as an historic
archive of what was printed today, retaining the generated date even when
being viewed tomorrow.

I had started with Today and realized that it recalculates each time the
document is opened. No good.

So then I built the document with SAVEDATE and it seems to work as long as
I
manually run the merge from within the document.

The desired goal, however, is to use a VBA macro to run the merge and then
copy and store the generated file in a specific directory. Though the
SAVEDATE works within the manual merge process, the macro's execution of
the
merge generates a date before today...?

Any advice?

Thanks.


.

  #5   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Arden Arden is offline
external usenet poster
 
Posts: 8
Default VBA macro - Mailmerge date - for today and for history

Macropod -

Thanks...I'll give this a try. It definitely seems like the direction we
want to go having today's date saved as the plain text.

Arden

"macropod" wrote:

Hi Arden,

In your mailmerge main document, simply embed the DATE field in a QUOTE field. To do this, select the date field, press Ctrl-F9 to
embed it in another field and type 'QUOTE' inside the left field brace. You should see something like:
{QUOTE1 December 2009}
Press F9 to update the field, then run your mailerge. The output document will now have today's date as plain text, rather than as a
DATE field.

--
Cheers
macropod
[Microsoft MVP - Word]


"Arden" wrote in message news
I am working with mailmerge documents which must print today's date in the
letter. A copy of the generated file also must be saved as an historic
archive of what was printed today, retaining the generated date even when
being viewed tomorrow.

I had started with Today and realized that it recalculates each time the
document is opened. No good.

So then I built the document with SAVEDATE and it seems to work as long as I
manually run the merge from within the document.

The desired goal, however, is to use a VBA macro to run the merge and then
copy and store the generated file in a specific directory. Though the
SAVEDATE works within the manual merge process, the macro's execution of the
merge generates a date before today...?

Any advice?

Thanks.


.



  #6   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Arden Arden is offline
external usenet poster
 
Posts: 8
Default VBA macro - Mailmerge date - for today and for history

The initial testing looks good, with the Quote/Date field actually coded as:
{QUOTE {DATE \@ "MMMM dd, yyy"} } to allow for the date formatting. The user
is confirming that her results are the same as our, both within the Main
document and through the VBA Template. We will confirm tomorrow that the
plain text date doesn't unexpectedly change before we modify across all of
our macros.

Thanks!

"Arden" wrote:

Macropod -

Thanks...I'll give this a try. It definitely seems like the direction we
want to go having today's date saved as the plain text.

Arden

"macropod" wrote:

Hi Arden,

In your mailmerge main document, simply embed the DATE field in a QUOTE field. To do this, select the date field, press Ctrl-F9 to
embed it in another field and type 'QUOTE' inside the left field brace. You should see something like:
{QUOTE1 December 2009}
Press F9 to update the field, then run your mailerge. The output document will now have today's date as plain text, rather than as a
DATE field.

--
Cheers
macropod
[Microsoft MVP - Word]


"Arden" wrote in message news
I am working with mailmerge documents which must print today's date in the
letter. A copy of the generated file also must be saved as an historic
archive of what was printed today, retaining the generated date even when
being viewed tomorrow.

I had started with Today and realized that it recalculates each time the
document is opened. No good.

So then I built the document with SAVEDATE and it seems to work as long as I
manually run the merge from within the document.

The desired goal, however, is to use a VBA macro to run the merge and then
copy and store the generated file in a specific directory. Though the
SAVEDATE works within the manual merge process, the macro's execution of the
merge generates a date before today...?

Any advice?

Thanks.


.

  #7   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default VBA macro - Mailmerge date - for today and for history

The date will be the date upon which the mail merge main document is created
from the template by the use of FileNew. If however, you use FileOpen,
then yes, you will get the date upon which the template was created.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com

"Arden" wrote in message
...
Doug -

Thanks for the counsel. I will re-test this. If I remember correctly from
last week's quick analysis, however, it was using the CREATEDATE of the
Template not necessarily the merged document.

Arden

"Doug Robbins - Word MVP" wrote:

Save the mail merge main document as a template and use a CREATEDATE
field
for the date. When a document is created from the template, the date
that
is displayed will be the date on which the document is created.

--
Hope this helps,

Doug Robbins - Word MVP

Please reply only to the newsgroups unless you wish to obtain my services
on
a paid professional basis.

"Arden" wrote in message
news
I am working with mailmerge documents which must print today's date in
the
letter. A copy of the generated file also must be saved as an historic
archive of what was printed today, retaining the generated date even
when
being viewed tomorrow.

I had started with Today and realized that it recalculates each time
the
document is opened. No good.

So then I built the document with SAVEDATE and it seems to work as long
as
I
manually run the merge from within the document.

The desired goal, however, is to use a VBA macro to run the merge and
then
copy and store the generated file in a specific directory. Though the
SAVEDATE works within the manual merge process, the macro's execution
of
the
merge generates a date before today...?

Any advice?

Thanks.


.

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
in old Word Documents the date changes to today BillS Microsoft Word Help 1 July 29th 09 05:22 PM
How do I enter a Default date of Today in a text Form Field Pawprint Microsoft Word Help 4 October 3rd 08 07:04 AM
In Word 2002 can I calculate a future date (Today + 7 days) ketilla Microsoft Word Help 3 May 16th 06 07:02 AM
Can I calculate a merged date field based on today plus # of days Lorraine Tables 5 March 30th 06 09:52 PM
Inserting Date but Not Today Alexei Danchenkov Microsoft Word Help 1 May 27th 05 02:39 PM


All times are GMT +1. The time now is 05:41 AM.

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

About Us

"It's about Microsoft Word"