Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Form field calculations

Date calculations in fields are complicated. The work has already been done
for you in the link in that web page to
http://www.wopr.com/cgi-bin/w3t/show...?Number=249902 All you have to do is
copy the field construction from that document and change the delay to the
number of days you want. You can use a REF field to your bookmarked date
field in place of the DATE field in the examples.

The alternative is to run a macro on exit from the date form field that puts
the calculated date in the form. Assuming the date in question if in form
field Text1 and you want the +30 in form field Text2. The following macro
will do that. Change the names of the fields as appropriate:

Sub Add30()
Dim sDate As Date
sDate = ActiveDocument.FormFields("Text1").Result
sDate = Format((sDate + 30), "dd/MM/yyyy")
ActiveDocument.FormFields("Text2").Result = sDate
End Sub


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Ropesend wrote:
Thank you. I was looking for something simpler. Maybe try recreating
this area in a table with words formula functionality. These

"Jay Freedman" wrote:

See http://www.gmayor.com/insert_a_date_...than_today.htm

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.

Ropesend wrote:
I created a form letter. The date of the letter is a form field. The
due date for reply is 30 days after the date of the letter. Is it
possible to create a form field for the due date that calculates
automatically?



 
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Date field calculations [email protected] Microsoft Word Help 2 July 14th 07 07:16 AM
Text Form Calculations Jose Cabral[_2_] Microsoft Word Help 1 March 7th 07 06:54 AM
calculations using field codes pompeyboyUSA Microsoft Word Help 1 October 23rd 05 01:38 AM
Form Field Calculations Adam Traver Microsoft Word Help 1 July 13th 05 02:36 PM
Calculations in form fields KathyHL Microsoft Word Help 1 June 18th 05 01:46 PM


All times are GMT +1. The time now is 05:28 AM.

Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"