Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-03-2022, 06:00 AM
Ulodesk Ulodesk is offline Strange behavior with Word macro Windows 10 Strange behavior with Word macro Office 2021
Word 2013 Expert Cert
Strange behavior with Word macro
 
Join Date: Sep 2009
Location: Virginia
Posts: 866
Ulodesk is on a distinguished road
Default Strange behavior with Word macro

The Createdate field has started misbehaving. It appears to work fine in a newly created document; I have a keyboard shortcut I have used for many years to insert it and right-align it. At some point recently, however, in older documents it began inserting the document's date of creation, so, it may actually be doing the same with new ones but just looks fine.



I have rerecorded the macro, and also tried using Insert/Field/Createdate; the result is the same. This morning I ran an online Office (365) repair, but to no avail, after two computer reboots to make sure the installation was complete.

Any ideas on how to fix this?
Reply With Quote
  #2  
Old 06-03-2022, 07:16 AM
wiganken wiganken is offline Strange behavior with Word macro Windows 11 Strange behavior with Word macro Office 2019
Expert
 
Join Date: Jul 2018
Posts: 279
wiganken will become famous soon enough
Default

Is the following of any help? It implies that Fieldnames a) 'CreateDate' and b) 'Date' work differently and a) will result in the behaviour you are having. Would using b) instead work?: -

Stopping DATE Fields from Updating when Opening a Document (Microsoft Word)
Reply With Quote
  #3  
Old 06-03-2022, 10:51 AM
Ulodesk Ulodesk is offline Strange behavior with Word macro Windows 10 Strange behavior with Word macro Office 2021
Word 2013 Expert Cert
Strange behavior with Word macro
 
Join Date: Sep 2009
Location: Virginia
Posts: 866
Ulodesk is on a distinguished road
Default

That's it precisely.
It has been so long since I created the macro, I don't recall the Createdate field; it seems to used to be InsertDate, but perhaps it was just Date. How the field in my macro got changed from the original is an interesting question -- or not; MS update, perhaps? I'll probably never know.

Thanks for the help!
Reply With Quote
  #4  
Old 06-03-2022, 01:28 PM
Charles Kenyon Charles Kenyon is offline Strange behavior with Word macro Windows 10 Strange behavior with Word macro Office 2019
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,081
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

Using Date Fields in Microsoft Word
Quote:
{ CREATEDATE } - The date the document was created (or saved using Save As). When used in a template, it will update in a new document based on the template, to the date the document is created.

The following gives you various CreateDate fields in different formats in AutoText:
Legal Toolbars Add-In
Reply With Quote
  #5  
Old 06-03-2022, 02:27 PM
Charles Kenyon Charles Kenyon is offline Strange behavior with Word macro Windows 10 Strange behavior with Word macro Office 2019
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,081
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

Quote:
Originally Posted by Ulodesk View Post
That's it precisely.
It has been so long since I created the macro, I don't recall the Createdate field; it seems to used to be InsertDate, but perhaps it was just Date. How the field in my macro got changed from the original is an interesting question -- or not; MS update, perhaps? I'll probably never know.

Thanks for the help!
AFAIK MS has not messed with the date fields in 20+ years. If the name of your macro is InsertDate it is probably an intercept macro. Intercepting events like Save and Print. What I have done for more than 20 years is simply create templates that have the CreateDate field in them.
Reply With Quote
  #6  
Old 06-04-2022, 12:40 AM
wiganken wiganken is offline Strange behavior with Word macro Windows 11 Strange behavior with Word macro Office 2019
Expert
 
Join Date: Jul 2018
Posts: 279
wiganken will become famous soon enough
Default

@Ulodesk - If your issue is fixed then you can mark the thread as solved by clicking on "Thread tools" and then "Mark as solved".
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Strange behavior with MS Word icon moffett Word 2 07-31-2019 03:30 PM
Strange behavior with Word macro Strange Behavior with a Graph in Word RP McIntosh Drawing and Graphics 6 07-01-2019 08:29 PM
Strange Behavior with a Graph in Word RP McIntosh Drawing and Graphics 1 01-27-2019 05:38 PM
Strange behavior with Word macro Strange macro behavior in 2016 Ulodesk Word VBA 5 04-02-2017 03:34 PM
Strange behavior with Word macro Pasting - strange behavior SatControl Word 5 02-14-2010 12:57 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:22 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