Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 09-24-2013, 08:06 PM
Chieps Chieps is offline Document properties in word - date format Windows XP Document properties in word - date format Office 2007
Novice
Document properties in word - date format
 
Join Date: Jun 2013
Posts: 4
Chieps is on a distinguished road
Wink

Hi charles

Great thanks for your response. It's hard enough to understand, but I will read out from the link for more try.


Thanks
Charles


Quote:
Originally Posted by Charles Kenyon View Post
See Calculated Dates in Microsoft Word using Fields or vba

Because of the ideosyncracies of the calendar, this is not simple. For the 24th to the 25th is simple. But because months can have different numbers of days and adding 1 to December 31 can push you into a different year, you don't end up just changing the day field.

A field for this looks something like { QUOTE "{ SET " Delay" "1" }
{
SET "DaysInMonth" { IF { CreateDate \@ "MM" } <> 2
{
= ROUND(30.575*
{ CreateDate \@ "MM" },0)-
ROUND(30.575*
{ = { CreateDate \@ "MM" } -1 },0) }
{
IF { = MOD( { CreateDate \@"yy" } , 4 ) } > 0 "28" "29" } } }
{
SET "NextMonth" { IF { CreateDate \@ "MM" } = 12 "1/97"
"
{ = { CreateDate \@ "MM"} + 1 }/97 } }
{
IF { = { REF "Delay" } + { CreateDate \@ "dd" } } <= {REF"DaysInMonth"}
{
CreateDate \@ "MMMM { = { REF "Delay" } + { CreateDate \@ "dd" } }, yyyy"}{ QUOTE { NextMonth \@ "MMMM"
}
{
=
{ REF "Delay" } + { CreateDate \@ "dd" } - { REF"DaysInMonth" } },
{
IF { CreateDate \@ "MM" } <> 12 { CreateDate \@ "yyyy" }
{
CreateDate \@ "{ = 1 + { CreateDate \@ "yyyy" } \# "xxxx" }" } } } }" }



Downright scary!


You can use vba instead. See the links on the page above to go to Paul Edstein's date calculation page if you want to try that route instead.

Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Document properties in word - date format format a Microsoft Word Document, and need your help! taylorr Word 1 02-16-2013 01:54 AM
Document properties in word - date format Issue with date format in mail merge document walshjod Mail Merge 4 11-28-2012 04:46 AM
Document properties in word - date format Add custom document properties into document NicBodkin Word 8 05-05-2011 09:09 AM
Document properties in word - date format Auto Change Date in Word Document??? dssxxxx Word 2 01-06-2011 05:50 AM

Other Forums: Access Forums

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