Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.pagelayout
|
|||
|
|||
Unable to get field formula to work
I'm trying to create a formula that will present the date 15 days from
today's date. This is what I have { DATE+15 \@ "MM/DD/YY" } but I get this result !Undefined Bookmark, DATE. I'm wanting to write a letter to a customer letting them know their payment is overdue and tell them what date they have to pay by. I want the "due date" to automatically calculate 15 days from "today's" date (ie: the date that I'm writing the letter). |
#2
Posted to microsoft.public.word.pagelayout
|
|||
|
|||
Unable to get field formula to work
This is more complex than you might imagine, but it can be done. See
http://addbalance.com/word/datefields2.htm for information on the different kinds of ways to make a date calculation work. It includes links to pages with fields and an explanation of different macros that can be used instead of fields. -- Charles Kenyon Word New User FAQ & Web Directory: http://addbalance.com/word Intermediate User's Guide to Microsoft Word (supplemented version of Microsoft's Legal Users' Guide) http://addbalance.com/usersguide See also the MVP FAQ: http://word.mvps.org/FAQs/ which is awesome! --------- --------- --------- --------- --------- --------- This message is posted to a newsgroup. Please post replies and questions to the newsgroup so that others can learn from my ignorance and your wisdom. "Lee" wrote in message ... I'm trying to create a formula that will present the date 15 days from today's date. This is what I have { DATE+15 \@ "MM/DD/YY" } but I get this result !Undefined Bookmark, DATE. I'm wanting to write a letter to a customer letting them know their payment is overdue and tell them what date they have to pay by. I want the "due date" to automatically calculate 15 days from "today's" date (ie: the date that I'm writing the letter). |
#3
Posted to microsoft.public.word.pagelayout
|
|||
|
|||
Unable to get field formula to work
Hi Lee,
To see how to do add an offset to a date, and do just about everything else you might want to do with dates in Word, check out my Date Calc 'tutorial', at: http://www.wopr.com/cgi-bin/w3t/show...?Number=249902 Cheers "Lee" wrote in message ... I'm trying to create a formula that will present the date 15 days from today's date. This is what I have { DATE+15 \@ "MM/DD/YY" } but I get this result !Undefined Bookmark, DATE. I'm wanting to write a letter to a customer letting them know their payment is overdue and tell them what date they have to pay by. I want the "due date" to automatically calculate 15 days from "today's" date (ie: the date that I'm writing the letter). |
#4
Posted to microsoft.public.word.pagelayout
|
|||
|
|||
Unable to get field formula to work
Hi Macropod,
I love your document and I know it's going to give me the result I am looking for, but because (I assume) you are Australian the language in the document is English (Aust.). I changed the language to English (US) but the calculations are still coming out wrong. Instead of the "result" being Feb 10 2006, it's showing as Oct 2 2006. Australian for Feb 10 2006 is 10/2/06 American for Feb 10 2006 is 2/10/06 How can I correct this to work for me? "macropod" wrote: Hi Lee, To see how to do add an offset to a date, and do just about everything else you might want to do with dates in Word, check out my Date Calc 'tutorial', at: http://www.wopr.com/cgi-bin/w3t/show...?Number=249902 Cheers "Lee" wrote in message ... I'm trying to create a formula that will present the date 15 days from today's date. This is what I have { DATE+15 \@ "MM/DD/YY" } but I get this result !Undefined Bookmark, DATE. I'm wanting to write a letter to a customer letting them know their payment is overdue and tell them what date they have to pay by. I want the "due date" to automatically calculate 15 days from "today's" date (ie: the date that I'm writing the letter). |
#5
Posted to microsoft.public.word.pagelayout
|
|||
|
|||
Unable to get field formula to work
The formulae should not be dependent on language and the results are
controlled by the switch at the end thus {QUOTE{SET Delay 15}{SET a{=INT((14-{DATE \@ M})/12)}}{SET b{={DATE \@ yyyy}+4800-a}}{SET c{={DATE \@ M}+12*a-3}}{SET d{DATE \@ d}}{SET jd{=d+INT((153*c+2)/5)+365*b+INT(b/4)-INT(b/100)+INT(b/400)-32045+Delay}}{SET e{=INT((4*(jd+32044)+3)/146097)}}{SET f{=jd+32044-INT(146097*e/4)}}{SET g{=INT((4*f+3)/1461)}}{SET h{=f-INT(1461*g/4)}}{SET i{=INT((5*h+2)/153)}}{SET dd{=h-INT((153*i+2)/5)+1}}{SET mm{=i+3-12*INT(i/10)}}{SET yy{=100*e+g-4800+INT(i/10)}}{=dd*10^6+mm*10^4+yy \# "00'-'00'-'0000"} \@ "MM/dd/yy"} However there have been some date transposition issues with some versions of Words that were fixed by updates. Check that you have the latest updates for your Word version. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Lee wrote: Hi Macropod, I love your document and I know it's going to give me the result I am looking for, but because (I assume) you are Australian the language in the document is English (Aust.). I changed the language to English (US) but the calculations are still coming out wrong. Instead of the "result" being Feb 10 2006, it's showing as Oct 2 2006. Australian for Feb 10 2006 is 10/2/06 American for Feb 10 2006 is 2/10/06 How can I correct this to work for me? "macropod" wrote: Hi Lee, To see how to do add an offset to a date, and do just about everything else you might want to do with dates in Word, check out my Date Calc 'tutorial', at: http://www.wopr.com/cgi-bin/w3t/show...?Number=249902 Cheers "Lee" wrote in message ... I'm trying to create a formula that will present the date 15 days from today's date. This is what I have { DATE+15 \@ "MM/DD/YY" } but I get this result !Undefined Bookmark, DATE. I'm wanting to write a letter to a customer letting them know their payment is overdue and tell them what date they have to pay by. I want the "due date" to automatically calculate 15 days from "today's" date (ie: the date that I'm writing the letter). |
#6
Posted to microsoft.public.word.pagelayout
|
|||
|
|||
Unable to get field formula to work
Hi Lee,
On page 1 of the document is a section named "Date input/output formats". This tells you how to edit the field to work with your regional settings. Cheers "Lee" wrote in message ... Hi Macropod, I love your document and I know it's going to give me the result I am looking for, but because (I assume) you are Australian the language in the document is English (Aust.). I changed the language to English (US) but the calculations are still coming out wrong. Instead of the "result" being Feb 10 2006, it's showing as Oct 2 2006. Australian for Feb 10 2006 is 10/2/06 American for Feb 10 2006 is 2/10/06 How can I correct this to work for me? "macropod" wrote: Hi Lee, To see how to do add an offset to a date, and do just about everything else you might want to do with dates in Word, check out my Date Calc 'tutorial', at: http://www.wopr.com/cgi-bin/w3t/show...?Number=249902 Cheers "Lee" wrote in message ... I'm trying to create a formula that will present the date 15 days from today's date. This is what I have { DATE+15 \@ "MM/DD/YY" } but I get this result !Undefined Bookmark, DATE. I'm wanting to write a letter to a customer letting them know their payment is overdue and tell them what date they have to pay by. I want the "due date" to automatically calculate 15 days from "today's" date (ie: the date that I'm writing the letter). |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Merge field delimiter in insert field formula ? | Mailmerge | |||
Suppressing Merge Field and text before/after | Microsoft Word Help | |||
Word 2000 formula field | Microsoft Word Help | |||
Unable to work on all tools of MS-Office though installed properl. | Microsoft Word Help | |||
Text Form Field Ref in Footer Won't Update on Screen | Microsoft Word Help |