Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 11-16-2021, 03:04 PM
Steve Kunkel Steve Kunkel is offline Include datestamp in QP text? Windows 10 Include datestamp in QP text? Office 2019
Advanced Beginner
Include datestamp in QP text?
 
Join Date: May 2019
Location: Seattle area
Posts: 81
Steve Kunkel is on a distinguished road
Default Include datestamp in QP text?


Hi There. I'm using the installed version of Office 365. I have several quick parts that contain text snippets that I put in reports. Below is part of an example. The "November 2021" part is not part of the quick part though. Is it possible to put a code in the quick part that will insert the date in the right format (MMMM YYYY)?

Note that this date should not be the date that the document is printed. It should simply be the date that the quick part was entered info the report.


November 2021, School Psychologist. Jane Doe was administered the Wechsler Primary and Preschool Scale of Intelligence-Forth Ed. (WPPSI-IV). The results are presented as scores below. ...
Reply With Quote
  #2  
Old 11-17-2021, 09:42 AM
Charles Kenyon Charles Kenyon is offline Include datestamp in QP text? Windows 10 Include datestamp in QP text? Office 2019
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,140
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

You want to include a date field. I would recommend a CreateDate field.
Using Date Fields in Microsoft Word
Reply With Quote
  #3  
Old 11-17-2021, 10:12 AM
Steve Kunkel Steve Kunkel is offline Include datestamp in QP text? Windows 10 Include datestamp in QP text? Office 2019
Advanced Beginner
Include datestamp in QP text?
 
Join Date: May 2019
Location: Seattle area
Posts: 81
Steve Kunkel is on a distinguished road
Default

Yep -- That's what I needed. Thanks Charles!

I made a Quick Part with this
Quote:
Date Stamp Test
The date is { Date \@ "MMMM yyyy" }. Tah dah.
Upon entering the QP I get this
Quote:
Date Stamp Test
The date is November 2021. Tah dah.
IMPORTANT: You don't type the braces { }. Leave those off, but select the code and press Ctrl+F9. Word will add the braces.
Reply With Quote
  #4  
Old 11-17-2021, 01:22 PM
Charles Kenyon Charles Kenyon is offline Include datestamp in QP text? Windows 10 Include datestamp in QP text? Office 2019
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,140
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

Steve, the DATE field changes any time you open on a new day.

The CREATEDATE field gives the date the document was created.
You can unlink the field if you want it to stay the same date in the document.
Reply With Quote
  #5  
Old 11-17-2021, 01:26 PM
Charles Kenyon Charles Kenyon is offline Include datestamp in QP text? Windows 10 Include datestamp in QP text? Office 2019
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,140
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

I use a macro for a date stamp and include a MacroButton Field in a quickpart to invoke it. I also have a QAT button to run the macro without the quickpart.
Code:
Sub DateTimeStamp()
    '   Inserts basic date and time stamp as text
    '   HansV
    '   Keyboard shortcut Shift+Alt+D,D
    '
    Selection.TypeText Format(Now, "dddd, d mmmm YYYY - h:mm am/pm")
End Sub
Reply With Quote
  #6  
Old 11-17-2021, 04:00 PM
Steve Kunkel Steve Kunkel is offline Include datestamp in QP text? Windows 10 Include datestamp in QP text? Office 2019
Advanced Beginner
Include datestamp in QP text?
 
Join Date: May 2019
Location: Seattle area
Posts: 81
Steve Kunkel is on a distinguished road
Default

Excellent! Many thanks.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Make Checkbox value include corresponding field text in another text box? froswell Word 1 08-09-2021 04:43 PM
Sum to include (-)/ Text feature Haha88 Excel 4 10-11-2017 02:55 PM
Include datestamp in QP text? Is it possible to include an entry in a TOC without the text being in the body? Makandriaco Word 7 01-26-2016 03:54 PM
Macro For Datestamp On ALL Pages Not Working In 2010 Hatman58 PowerPoint 2 08-26-2014 05:14 AM
Include datestamp in QP text? Word 2003 - IncludeText Does Not Include Bookmark Text if in a Form Text Control skarden Word 1 12-12-2011 10:39 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:41 PM.


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