Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
I am trying to create a form using Microsoft Word. My templet only uses text
form fields and drop down boxes. In one of my text boxes' "properties", the text form field type is current date (in the text form field properties it is bookmarked as "text3"). In my next text form field (book marked as "text4") I want it to show on the form as the current date in "text3" plus 7 week days. For example: 1/24/2008 in "text3". In "text4" 1/31/2008. What calculation goes in the EXPRESSION box if the text form field type is a calculation? |
#2
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
See http://www.gmayor.com/insert_a_date_...than_today.htm.
-- Stefan Blom Microsoft Word MVP "Jimmie Hall" wrote: I am trying to create a form using Microsoft Word. My templet only uses text form fields and drop down boxes. In one of my text boxes' "properties", the text form field type is current date (in the text form field properties it is bookmarked as "text3"). In my next text form field (book marked as "text4") I want it to show on the form as the current date in "text3" plus 7 week days. For example: 1/24/2008 in "text3". In "text4" 1/31/2008. What calculation goes in the EXPRESSION box if the text form field type is a calculation? |
#3
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
Sorry, I didn't read the original question very carefully. You cannot do this
calculation in the form field options dialog box. I believe an "On exit" macro is required. You may want to ask in a programming newsgroup such as microsoft.public.word.vba.general. -- Stefan Blom Microsoft Word MVP "Stefan Blom" wrote: See http://www.gmayor.com/insert_a_date_...than_today.htm. -- Stefan Blom Microsoft Word MVP "Jimmie Hall" wrote: I am trying to create a form using Microsoft Word. My templet only uses text form fields and drop down boxes. In one of my text boxes' "properties", the text form field type is current date (in the text form field properties it is bookmarked as "text3"). In my next text form field (book marked as "text4") I want it to show on the form as the current date in "text3" plus 7 week days. For example: 1/24/2008 in "text3". In "text4" 1/31/2008. What calculation goes in the EXPRESSION box if the text form field type is a calculation? |
#4
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
You can do it with a calculated field (not a calculated form field) which
your link to my web site would demonstrate, but if you want the information in a form field, you would need an exit macro eg Sub Add7() Dim sDate As Date sDate = ActiveDocument.FormFields("Text3").Result sDate = Format((sDate + 7)) ActiveDocument.FormFields("Text4").Result = sDate End Sub Set both form fields as 'date' type with the formatting switch as appropriate. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Stefan Blom wrote: Sorry, I didn't read the original question very carefully. You cannot do this calculation in the form field options dialog box. I believe an "On exit" macro is required. You may want to ask in a programming newsgroup such as microsoft.public.word.vba.general. See http://www.gmayor.com/insert_a_date_...than_today.htm. -- Stefan Blom Microsoft Word MVP "Jimmie Hall" wrote: I am trying to create a form using Microsoft Word. My templet only uses text form fields and drop down boxes. In one of my text boxes' "properties", the text form field type is current date (in the text form field properties it is bookmarked as "text3"). In my next text form field (book marked as "text4") I want it to show on the form as the current date in "text3" plus 7 week days. For example: 1/24/2008 in "text3". In "text4" 1/31/2008. What calculation goes in the EXPRESSION box if the text form field type is a calculation? |
#5
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
Graham, thank you for "filling in the gaps" in my reply. :-)
-- Stefan Blom Microsoft Word MVP "Graham Mayor" wrote in message ... You can do it with a calculated field (not a calculated form field) which your link to my web site would demonstrate, but if you want the information in a form field, you would need an exit macro eg Sub Add7() Dim sDate As Date sDate = ActiveDocument.FormFields("Text3").Result sDate = Format((sDate + 7)) ActiveDocument.FormFields("Text4").Result = sDate End Sub Set both form fields as 'date' type with the formatting switch as appropriate. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Stefan Blom wrote: Sorry, I didn't read the original question very carefully. You cannot do this calculation in the form field options dialog box. I believe an "On exit" macro is required. You may want to ask in a programming newsgroup such as microsoft.public.word.vba.general. See http://www.gmayor.com/insert_a_date_...than_today.htm. -- Stefan Blom Microsoft Word MVP "Jimmie Hall" wrote: I am trying to create a form using Microsoft Word. My templet only uses text form fields and drop down boxes. In one of my text boxes' "properties", the text form field type is current date (in the text form field properties it is bookmarked as "text3"). In my next text form field (book marked as "text4") I want it to show on the form as the current date in "text3" plus 7 week days. For example: 1/24/2008 in "text3". In "text4" 1/31/2008. What calculation goes in the EXPRESSION box if the text form field type is a calculation? |
Reply |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Form field calculations | Microsoft Word Help | |||
Text Form Field Deleting Certain Words After I Type Them... | Microsoft Word Help | |||
Is there a way to type formatted text into a form field? | Microsoft Word Help | |||
Form Field Calculations | Microsoft Word Help | |||
How do I make a "text form field" stay still so that when I type . | Microsoft Word Help |