Microsoft Office Forums

Go Back   Microsoft Office Forums > Microsoft Word > Mail Merge

Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 12-04-2018, 02:45 PM
GregL GregL is offline Windows 7 64bit Office 2010 32bit
Novice
 
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 Windows 10 Office 2016
Expert
 
Join Date: Aug 2014
Posts: 2,660
gmayor is a jewel in the roughgmayor is a jewel in the roughgmayor is a jewel in the roughgmayor is a jewel in the rough
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)
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 Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 18,989
macropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to behold
Default

See Convert Mailmerge Date Fields to Plain Text in the Mailmerge Tips & Tricks 'Sticky' thread at the top of this forum: http://www.msofficeforums.com/mail-m...ps-tricks.html
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
  #4  
Old 12-19-2018, 10:27 AM
GregL GregL is offline Windows 7 64bit Office 2010 32bit
Novice
 
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 Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 18,989
macropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to behold
Default

Did you read Note 1 in the link's Introduction?
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
  #6  
Old 12-19-2018, 03:09 PM
GregL GregL is offline Windows 7 64bit Office 2010 32bit
Novice
 
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 Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 18,989
macropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to behold
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
[MS MVP - Word]
Reply With Quote
  #8  
Old 12-19-2018, 05:02 PM
GregL GregL is offline Windows 7 64bit Office 2016
Novice
 
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 Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 18,989
macropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to behold
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
[MS MVP - Word]
Reply With Quote
  #10  
Old 12-19-2018, 07:24 PM
GregL GregL is offline Windows 7 64bit Office 2016
Novice
 
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 Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 18,989
macropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to behold
Default

The mailmerge main document is unaffected; you can still edit the field code there.
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
  #12  
Old 12-19-2018, 10:32 PM
GregL GregL is offline Windows 7 64bit Office 2016
Novice
 
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 Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 18,989
macropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to behold
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
[MS MVP - Word]
Reply With Quote
  #14  
Old 12-20-2018, 12:08 AM
GregL GregL is offline Windows 7 64bit Office 2016
Novice
 
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
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


All times are GMT -7. The time now is 10:42 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
MSOfficeForums.com is not affiliated with Microsoft