none
Update Date in Document RRS feed

  • Question

  • I have a mailmerge template that has the date in it. The date updates to today's date any time the template is opened. I use VBA to create documents with this template. I want the date in the new documents to be permanant, so when those documents are opened they will still have the date that the document was created. 

    Example: As of May 16th, 2016 you have not responded to our request.

    Any suggestions?

    tod

    Thursday, May 19, 2016 8:13 PM

Answers

All replies

  • Option 1: select the date and press Ctrl+F11. This locks the date field against updating.

    Option 2: right-click the date and select Toggle Field Codes from the context menu. You'll see something like

    { DATE }

    or

    { DATE \@ "MM/dd/yyyy" }

    Change the word DATE to CREATEDATE.

    Then press F9 to hide the field code and to update its value. The field will now display the date that the document was created.


    Regards, Hans Vogelaar (http://www.eileenslounge.com)

    Thursday, May 19, 2016 9:54 PM
  • Thanx Hans. I'm looking for a way to do this in VBA, so I don't have to touch the document that's been generated. 
    Thursday, May 19, 2016 10:03 PM
  • Hi todtown,

    I think the suggestion given by the Hans Vogelaar can solve your issue.

    if you think it is helpful to solve your issue then I would recommend you to mark the suggestion given by the Hans Vogelaar as Answer.

    if you still having problems please let us know about that.

    Regards

    Deepak


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, May 20, 2016 2:41 AM
    Moderator
  • In a mailmerge using a mailmerge main document, a CREATEDATE field will output the date the mailmerge main document was created, not the date the merge was executed. Conversely a DATE field will output the date the mailmerge was executed, but that field will auto-update next time the output document is opened. The solution is to embed the DATE field the mailmerge main document in a QUOTE field, thus:

    {QUOTE{DATE}}

    with whatever date format switches you require. When the merge is executed, the QUOTE field will cause the DATE field to unlink in the output document, leaving just the fixed date behind.

    Another advantage this has over a CREATEDATE field (even where you use a true template for the merge) is that it won't re-set if you later re-save the output document via Save As.


    Cheers
    Paul Edstein
    [MS MVP - Word]

    Friday, May 20, 2016 2:54 AM
  • Hi todtown,

    I think make a use of label would be a simple solution.

    you have mentioned that you want to solution in VBA and you are using a VBA to create documents with that template.

    so here I would recommend you that you can add a label and when you execute your VBA to create Document at that time you can assign the value to label and once you set you need not worry about that it get changed.

    Regards

    Deepak 


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Thursday, May 26, 2016 7:07 AM
    Moderator
  • I don't know how to put a label in place of the date, and I wonder if it would look seamless. 

    What if I created some kind of marker that my VBA code could find and replace it in the new document with a hard coded date?

    tod

     

    Thursday, June 2, 2016 4:54 PM
  • When I tried this it puts the date my template was created, not the date the new document was created.
    Thursday, June 2, 2016 4:55 PM
  • It is not possible for the field code I supplied to do that in a mailmerge - only Hans' solution would do that, and only if you used a mailmerge main document, not a template - and it doesn't need a label.

    Cheers
    Paul Edstein
    [MS MVP - Word]

    Thursday, June 2, 2016 9:35 PM