B
Bill Foley
Hey Gang,
Word 2003
Trying to create an automated form for my church and am stumped as to how to
do this. I have a calendar form (actually two of them) that populate
formfields (StartDate and EndDate). I have another formfield (TotalDays)
that I cm trying to populate with the number of days difference between the
other two formfields. I assigned the following macro to the "Entry" of the
TotalDays field. However, it is not working.
Sub CalculateTotalDays()
ActiveDocument.FormFields("TotalDays").Result = DateDiff("d", EndDate,
StartDate)
End Sub
I am assuming that Word can't recognize formfields the same way Acces does
to know to use them in the calculation, but I can't seem to find a way to
make it work.
Any ideas? TIA!
Word 2003
Trying to create an automated form for my church and am stumped as to how to
do this. I have a calendar form (actually two of them) that populate
formfields (StartDate and EndDate). I have another formfield (TotalDays)
that I cm trying to populate with the number of days difference between the
other two formfields. I assigned the following macro to the "Entry" of the
TotalDays field. However, it is not working.
Sub CalculateTotalDays()
ActiveDocument.FormFields("TotalDays").Result = DateDiff("d", EndDate,
StartDate)
End Sub
I am assuming that Word can't recognize formfields the same way Acces does
to know to use them in the calculation, but I can't seem to find a way to
make it work.
Any ideas? TIA!