Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 12-04-2018, 02:45 PM
GregL GregL is offline Field for date that I run the mail merge; not Date nor CreateDate Windows 7 64bit Field for date that I run the mail merge; not Date nor CreateDate Office 2010 32bit
Novice
Field for date that I run the mail merge; not Date nor CreateDate
 
Join Date: Jun 2011
Posts: 12
GregL is on a distinguished road
Default Field for date that I run the mail merge; not Date nor CreateDate

I'm doing mail merge in MS Word 2016 to create letters that I mail out. The letters have a date on them representing the date I mail the letter.



Rather than update that date every time, I want a field to insert the current date when I run the mail merge. However, when I create a set of documents by running the mail merge, I don't want that date to update if I later open the document. I want the date to remain the date that I ran the mail merge.

If I use the "Date" field, it works fine when I run the mail merge but updates the date if I later open one of the files created by the mail merge.

If I use the "CreateDate" field, it shows the date the original document was created, not the date I ran the mail merge.

What can I do to get it to automatically give me the date that I run the mail merge, but not update it later if I open a file created by the mail merge?
Reply With Quote
  #2  
Old 12-15-2018, 03:57 AM
gmayor's Avatar
gmayor gmayor is offline Field for date that I run the mail merge; not Date nor CreateDate Windows 10 Field for date that I run the mail merge; not Date nor CreateDate Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,101
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

One possibility would be to use a date field and split the merge with
http://www.gmayor.com/individual_merge_letters.htm. The resulting documents would have the date you ran the merge fixed.
OR
You could use a CREATEDATE field, SaveAs with the same name and update the field before running the merge,

__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #3  
Old 12-18-2018, 04:53 PM
macropod's Avatar
macropod macropod is offline Field for date that I run the mail merge; not Date nor CreateDate Windows 7 64bit Field for date that I run the mail merge; not Date nor CreateDate Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

See Convert Mailmerge Date Fields to Plain Text in the Mailmerge Tips & Tricks 'Sticky' thread at the top of this forum: https://www.msofficeforums.com/mail-...ps-tricks.html
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #4  
Old 12-19-2018, 10:27 AM
GregL GregL is offline Field for date that I run the mail merge; not Date nor CreateDate Windows 7 64bit Field for date that I run the mail merge; not Date nor CreateDate Office 2010 32bit
Novice
Field for date that I run the mail merge; not Date nor CreateDate
 
Join Date: Jun 2011
Posts: 12
GregL is on a distinguished road
Default

Thanks, it's great to know there is a way. But I don't understand to implement it.

I'm in Word 2016. I choose Insert tab > Text section > Quick Parts > Field, to get to the Field dialog.

In the list of codes I see both Date and Quote. If I choose Date and click Field Codes, the field code is populated with the word DATE. If I change that to QUOTE{DATE}, it returns nothing. If I do the same starting with QUOTE, same result. If I try {QUOTE{DATE}}, the OK button remains grayed out, so I can't return it.

If instead of selecting Date or Quote from the list I choose Formula, and enter the formula =QUOTE{DATE}, I get an error in the document when I return it. Same result with ={QUOTE{DATE}}.

In all cases, if I substitute parens for curly braces, that doesn't work either.

What am I missing?
Reply With Quote
  #5  
Old 12-19-2018, 02:34 PM
macropod's Avatar
macropod macropod is offline Field for date that I run the mail merge; not Date nor CreateDate Windows 7 64bit Field for date that I run the mail merge; not Date nor CreateDate Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Did you read Note 1 in the link's Introduction?
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #6  
Old 12-19-2018, 03:09 PM
GregL GregL is offline Field for date that I run the mail merge; not Date nor CreateDate Windows 7 64bit Field for date that I run the mail merge; not Date nor CreateDate Office 2010 32bit
Novice
Field for date that I run the mail merge; not Date nor CreateDate
 
Join Date: Jun 2011
Posts: 12
GregL is on a distinguished road
Default

Thanks, yes, I read that, so I knew not to type the curly braces in the Word doc. I also tried not typing them into the Field dialog.

I searched that tome on "wrap" and found something that got me a little further. Under "Basic Mailmerge Maths", #2, it says "press Ctrl-F9 to wrap another field around it, thus { «Price» }".

I tried putting in a Date field, selecting it, and pressing Ctrl+F9. It put the curly braces around it. Woo-hoo! However, I don't know where to go from there to wrap a Quote field around it. If I select it, right-click and try to edit it, the "Edit Field" choice is grayed out. If I select it and choose Insert tab > Text section > Quick Parts > Field, and select Quote, the quote field replaces the Date field.

So... after I've pressed Ctrl+F9 on a Date field so it look like this in the doc....

{ 12/19/2018 }

...where do I go from there to wrap it in a Quote field?


Update:

I tried doing it the other way around, starting with the Quote field and adding the Date field inside it. Here's what happened:

- I added a Quote field, with the text "abc" as a placeholder, and returned that to the doc.
- I selected the new Quote field and pressed Ctrl+F9, which added the curly braces around it. At this point it looked like this:

{ abc }

- I selected the abc text and chose Insert tab > Text section > Quick Parts > Field, and added a Date field, choosing one of the date formatting choices. Returning from the Field dialog to the doc it looked like this:

{ December 19, 2018 }

But when I do the merge, this results in nothing; a blank line.

What am I doing wrong?
Reply With Quote
  #7  
Old 12-19-2018, 04:10 PM
macropod's Avatar
macropod macropod is offline Field for date that I run the mail merge; not Date nor CreateDate Windows 7 64bit Field for date that I run the mail merge; not Date nor CreateDate Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Press Ctrl-F9 twice to create a nested pair of field braces, thus { { }}. Type 'QUOTE' after the first brace and 'DATE' after the second brace, so you get {QUOTE{DATE} }. Complete the merge. Done.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #8  
Old 12-19-2018, 05:02 PM
GregL GregL is offline Field for date that I run the mail merge; not Date nor CreateDate Windows 7 64bit Field for date that I run the mail merge; not Date nor CreateDate Office 2016
Novice
Field for date that I run the mail merge; not Date nor CreateDate
 
Join Date: Jun 2011
Posts: 12
GregL is on a distinguished road
Default

Thanks, that worked, and it's so simple! Weird that the tome doesn't make it clear. They should change this:
To force DATE fields to convert to their results (ie so that they become static dates), reflecting the date on which the merge was performed, simply embed them in a QUOTE field coded along the lines of:

{QUOTE{DATE}}
To this:
To force DATE fields to convert to their results (ie so that they become static dates), reflecting the date on which the merge was performed, simply embed them in a QUOTE field by pressing Ctrl+F9 twice to get two nested pairs of field braces, and type QUOTE after the first brace and DATE after the 2nd brace, like this:

{QUOTE{DATE}}
Reply With Quote
  #9  
Old 12-19-2018, 05:19 PM
macropod's Avatar
macropod macropod is offline Field for date that I run the mail merge; not Date nor CreateDate Windows 7 64bit Field for date that I run the mail merge; not Date nor CreateDate Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by GregL View Post
They should change this:
The 'they' in this case is me, and I'm not inclined to make that example inconsistent with the rest of the examples in the thread. The instructions in that example, if followed correctly, will produce the same result as the workaround I gave you.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #10  
Old 12-19-2018, 07:24 PM
GregL GregL is offline Field for date that I run the mail merge; not Date nor CreateDate Windows 7 64bit Field for date that I run the mail merge; not Date nor CreateDate Office 2016
Novice
Field for date that I run the mail merge; not Date nor CreateDate
 
Join Date: Jun 2011
Posts: 12
GregL is on a distinguished road
Default

Interesting how it becomes uneditable, even in the original doc, after doing a merge. So if you want to just change the date formatting, you have to scrap it and start over. Or is there a way to make it go back into editable form?
Reply With Quote
  #11  
Old 12-19-2018, 07:54 PM
macropod's Avatar
macropod macropod is offline Field for date that I run the mail merge; not Date nor CreateDate Windows 7 64bit Field for date that I run the mail merge; not Date nor CreateDate Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

The mailmerge main document is unaffected; you can still edit the field code there.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #12  
Old 12-19-2018, 10:32 PM
GregL GregL is offline Field for date that I run the mail merge; not Date nor CreateDate Windows 7 64bit Field for date that I run the mail merge; not Date nor CreateDate Office 2016
Novice
Field for date that I run the mail merge; not Date nor CreateDate
 
Join Date: Jun 2011
Posts: 12
GregL is on a distinguished road
Default

I was talking about the mailmerge main document; it is still a working field there but not editable.
Reply With Quote
  #13  
Old 12-19-2018, 11:10 PM
macropod's Avatar
macropod macropod is offline Field for date that I run the mail merge; not Date nor CreateDate Windows 7 64bit Field for date that I run the mail merge; not Date nor CreateDate Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

The field is editable in the mailmerge main document. Either select it and press Shift-F9 to expose that field code, or press Alt-F9 to expose all field codes in the document.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #14  
Old 12-20-2018, 12:08 AM
GregL GregL is offline Field for date that I run the mail merge; not Date nor CreateDate Windows 7 64bit Field for date that I run the mail merge; not Date nor CreateDate Office 2016
Novice
Field for date that I run the mail merge; not Date nor CreateDate
 
Join Date: Jun 2011
Posts: 12
GregL is on a distinguished road
Default

Ah, thanks.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel pivot table with a DATE value field for some reason stops at a certain date angie450 Excel Programming 2 08-19-2014 08:50 AM
Adding text before a date merge field AND fomatting date as well NikkiR Mail Merge 1 08-06-2014 07:18 PM
Date field inserting merge date in blank field Lesley Mail Merge 5 09-30-2013 01:49 AM
Field for date that I run the mail merge; not Date nor CreateDate Mail merge will not format date field generated by Excel IF statement borntorun75 Mail Merge 3 12-16-2011 06:28 AM
Wrong date with CreateDate Blablub Word 0 02-18-2010 04:20 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:02 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft