Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #16  
Old 11-21-2023, 04:45 PM
roger.stern@mail.com roger.stern@mail.com is offline Ordinal Numbers with DatePicker Windows 10 Ordinal Numbers with DatePicker Office 2021
Novice
Ordinal Numbers with DatePicker
 
Join Date: Sep 2023
Posts: 19
roger.stern@mail.com is on a distinguished road
Default


I've attacthed the document I created along with the macros that were pasted from the samples
Attached Files
File Type: docm Ordinal Test .docm (27.8 KB, 4 views)
Reply With Quote
  #17  
Old 11-23-2023, 02:24 PM
macropod's Avatar
macropod macropod is offline Ordinal Numbers with DatePicker Windows 10 Ordinal Numbers with DatePicker Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,359
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 also: https://www.msofficeforums.com/word-...t-ordinal.html
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #18  
Old 11-30-2023, 09:20 AM
roger.stern@mail.com roger.stern@mail.com is offline Ordinal Numbers with DatePicker Windows 10 Ordinal Numbers with DatePicker Office 2021
Novice
Ordinal Numbers with DatePicker
 
Join Date: Sep 2023
Posts: 19
roger.stern@mail.com is on a distinguished road
Default

Greg. Thanks. This works and I created a new document copying your macros and date picker field and it works. But when I try to add a new date picker of my own, it doesn't work. How can I create one that works. Also, when I click on properties for your date picking field I don't get as many options. Why is that?
Reply With Quote
  #19  
Old 08-21-2024, 10:13 AM
roger.stern@mail.com roger.stern@mail.com is offline Ordinal Numbers with DatePicker Windows 10 Ordinal Numbers with DatePicker Office 2021
Novice
Ordinal Numbers with DatePicker
 
Join Date: Sep 2023
Posts: 19
roger.stern@mail.com is on a distinguished road
Default Modifying Output

Greg has been super helpful in displaying the ordinal date in the format
"D of MMMM,YYYY" Now I need to change the ordinal disaplay to "MMMM D" and I'm not sure how to modify the code.


This what I've been using as mod_SpecFormatDates See Attachment
Attached Files
File Type: txt old code.txt (5.5 KB, 5 views)
Reply With Quote
  #20  
Old 08-21-2024, 04:19 PM
gmaxey gmaxey is offline Ordinal Numbers with DatePicker Windows 10 Ordinal Numbers with DatePicker Office 2019
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,598
gmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nice
Default

Roger, I'm not sure I understand what you are trying to do. In the file download, I provided examples for outputting the selected date in both "D of MMMM, YYYY" and "MMMM d, YYYY" do you only want MMMM d?


If so, modify:

Case "BODMDY"
With oRng
.Text = Format(oDate, "MMMM d")
.Collapse wdCollapseEnd
.Start = .End
.InsertAfter fcnOrdinal(Format(oDate, "D"))
.Font.Superscript = True
.Start = .End
'.InsertAfter " " & Format(oDate, "YYYY") (stet out this line)
.Font.Superscript = False
End With
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote
  #21  
Old 08-26-2024, 12:47 PM
roger.stern@mail.com roger.stern@mail.com is offline Ordinal Numbers with DatePicker Windows 10 Ordinal Numbers with DatePicker Office 2021
Novice
Ordinal Numbers with DatePicker
 
Join Date: Sep 2023
Posts: 19
roger.stern@mail.com is on a distinguished road
Default

Thanks Greg, Let me look at your examplges again. Also now it will be MMMM d, YYYy
Reply With Quote
  #22  
Old 08-26-2024, 01:09 PM
roger.stern@mail.com roger.stern@mail.com is offline Ordinal Numbers with DatePicker Windows 10 Ordinal Numbers with DatePicker Office 2021
Novice
Ordinal Numbers with DatePicker
 
Join Date: Sep 2023
Posts: 19
roger.stern@mail.com is on a distinguished road
Default

OK Greg. Here's what I don't understand. Do I have to change something to do something to change from EOD to BODMDY?
Thanks,
ROger
Reply With Quote
  #23  
Old 08-26-2024, 01:12 PM
roger.stern@mail.com roger.stern@mail.com is offline Ordinal Numbers with DatePicker Windows 10 Ordinal Numbers with DatePicker Office 2021
Novice
Ordinal Numbers with DatePicker
 
Join Date: Sep 2023
Posts: 19
roger.stern@mail.com is on a distinguished road
Default

FIgured it out. thanks
Reply With Quote
  #24  
Old 05-27-2025, 06:06 PM
roger.stern@mail.com roger.stern@mail.com is offline Ordinal Numbers with DatePicker Windows 10 Ordinal Numbers with DatePicker Office 2021
Novice
Ordinal Numbers with DatePicker
 
Join Date: Sep 2023
Posts: 19
roger.stern@mail.com is on a distinguished road
Default

You've been super helpful in the past. I'm now facing a new and perplexing problem. When I insert a date picker, it works until I save the file. It ceases to function in a saved file. I've tried to save as both a document and template, with and without macro support and the result is the same. One the file is saved, the datepicker ceases to function. Any thoughts?
Reply With Quote
  #25  
Old 05-29-2025, 05:13 PM
macropod's Avatar
macropod macropod is offline Ordinal Numbers with DatePicker Windows 10 Ordinal Numbers with DatePicker Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,359
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

If the datepicker is being deleted, that suggests you're saving the document in the older .doc format, which doesn't support content controls. Content controls get converted to plain text in such documents.

If it's just that the ordinal function ceases to work, that suggests you're saving the document in the .docx format and that the ordinal function is in an underlying .docm document instead of being in a .dotm template to which your document is attached.

If neither of those is the issue, then, without actually seeing the problem document, it can be difficult for anyone to work out what's going on. Can you attach a document to a post with some representative data (delete anything sensitive)? You do this via the paperclip symbol on the 'Go Advanced' tab at the bottom of this screen.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #26  
Old 06-03-2025, 04:16 PM
roger.stern@mail.com roger.stern@mail.com is offline Ordinal Numbers with DatePicker Windows 10 Ordinal Numbers with DatePicker Office 2021
Novice
Ordinal Numbers with DatePicker
 
Join Date: Sep 2023
Posts: 19
roger.stern@mail.com is on a distinguished road
Default

Paul, I was saving as docm or dotm. Deleting the normal template and recreating it seems to have solved it. What I realized was unusual that if the date picker or other content control didn't function in a saved file, when I opened the enable editing menu and close it full functionality returns, even though I never disabled editing. Strange
Reply With Quote
  #27  
Old 06-03-2025, 04:18 PM
macropod's Avatar
macropod macropod is offline Ordinal Numbers with DatePicker Windows 10 Ordinal Numbers with DatePicker Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,359
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

Glad you got it sorted.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Replace all Images with ordinal numbers in multiple files beginner Word 0 09-19-2021 02:19 AM
Formatting th at the end of ordinal dates DBlomgren Publisher 0 01-23-2016 09:44 AM
How do I code ListBox and DatePicker in UserForm? - Word 2013 ickelly Word VBA 4 08-05-2015 04:07 PM
Ordinal Numbers with DatePicker Datepicker format piper7971 Excel 1 07-26-2015 02:29 AM
MergeField Alphabetic Ordinal substitutes _ for Z khinnenkamp Mail Merge 1 09-29-2013 07:01 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:11 PM.


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