Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-08-2013, 12:51 AM
tinfanide tinfanide is offline Field Date: UCase()? Windows 7 64bit Field Date: UCase()? Office 2010 32bit
Expert
Field Date: UCase()?
 
Join Date: Aug 2011
Posts: 312
tinfanide is on a distinguished road
Default Field Date: UCase()?

Code:
Dim sField As Field
Set sField = ActiveDocument.Fields.Add(Selection.Range, wdFieldDate, "\@ ""yyyy/MM/dd ddd, HH:mm:ss""", True)
Is there a way to UCase the "ddd"?
Reply With Quote
  #2  
Old 02-08-2013, 01:36 AM
macropod's Avatar
macropod macropod is offline Field Date: UCase()? Windows 7 64bit Field Date: UCase()? Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
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

Simple:
Code:
Dim sField As Field
Set sField = ActiveDocument.Fields.Add(Selection.Range, wdFieldDate, _
    "\@ ""yyyy/MM/dd ddd, HH:mm:ss"" \* Upper", False)
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 02-08-2013, 03:01 AM
tinfanide tinfanide is offline Field Date: UCase()? Windows 7 64bit Field Date: UCase()? Office 2010 32bit
Expert
Field Date: UCase()?
 
Join Date: Aug 2011
Posts: 312
tinfanide is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post
Simple:
Code:
Dim sField As Field
Set sField = ActiveDocument.Fields.Add(Selection.Range, wdFieldDate, _
    "\@ ""yyyy/MM/dd ddd, HH:mm:ss"" \* Upper", False)
Thanks for that. Yes, it's as simple as that.
But I wonder why after it runs and I edit the field, Word hangs (Not responding).
Reply With Quote
  #4  
Old 02-08-2013, 03:44 AM
macropod's Avatar
macropod macropod is offline Field Date: UCase()? Windows 7 64bit Field Date: UCase()? Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
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

Probably something to do with your system - on mine the field updates instantaneously with no suggestion of hanging.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #5  
Old 02-08-2013, 09:43 AM
tinfanide tinfanide is offline Field Date: UCase()? Windows 7 64bit Field Date: UCase()? Office 2010 32bit
Expert
Field Date: UCase()?
 
Join Date: Aug 2011
Posts: 312
tinfanide is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post
Probably something to do with your system - on mine the field updates instantaneously with no suggestion of hanging.
Yes, if update field (By pressing F9 or clicking on the right-click menu), no problem.
But, if edit field, it hangs.
Reply With Quote
  #6  
Old 02-08-2013, 03:01 PM
macropod's Avatar
macropod macropod is offline Field Date: UCase()? Windows 7 64bit Field Date: UCase()? Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
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

The Edit|Field dialogue is incapable of handling such customisations. If you want to edit a customised field, do it via Shift-F9.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Field Date: UCase()? Date Field to add 10 Days to Current Date Erbwon Word 6 11-12-2012 06:17 PM
Field Date: UCase()? Date/Time Field Autopopulation Question Dendalee Word 3 10-26-2012 06:37 AM
Please help me with creating due date field Artemio Word 1 03-01-2012 08:10 PM
Field Date: UCase()? Calculate date in word field edwedw Mail Merge 3 11-30-2011 02:10 PM
Formula to subtract one month from due date field in reminder field ghumdinger Outlook 1 10-01-2011 12:09 AM

Other Forums: Access Forums

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