Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #5  
Old 04-08-2020, 07:03 AM
gmaxey gmaxey is offline Date Picker time in a protected Word form Windows 10 Date Picker time in a protected Word form Office 2016
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,636
gmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nice
Default

Andrew, good point. This might do better if picking a date other than today.


Code:
Private Sub Document_ContentControlOnExit(ByVal CC As ContentControl, Cancel As Boolean)
  If CC.Type = wdContentControlDate Then
    If IsDate(CC.Range.Text) Then
      If CC.DateDisplayFormat = "M/d/yyyy h:mm:ss am/pm" Then
         CC.Range.Text = Format(CDate(CC.Range.Text), "M/d/yyyy") & " " & Time
      End If
    End If
  End If
End Sub
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Date Picker time in a protected Word form I cannot figure out how to add a date picker, among others, in MS Word 2016 on my mac Randree Word 3 04-25-2017 09:44 PM
Possible to link a date picker to another date picker? tubbz Word 0 05-07-2014 01:23 PM
Date Picker time in a protected Word form Word form w/ autopopulated date/time Dendalee Word 1 10-24-2012 11:40 PM
Date Picker time in a protected Word form word 2003 date picker nashville Word 16 04-06-2012 04:12 AM
Word 2007 date and time picker dmcohio Word 2 04-09-2010 04:13 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:57 AM.


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