N
natanz
I have a template project where a user will enter two dates in
formfields formatted as dates. I want a third field to calculate the
number of weekdays between those two dates.
I have started out with this, but it is not working.
Public Sub weekdaysbetween()
ActiveDocument.FormFields("weekdays").Result =
ActiveDocument.FormFields("date2").Result -
ActiveDocument.FormFields("date1").Result
End Sub
I know that this would only calculate the total difference in the
number of days (not only weekdays) if it was working, so that is the
first problem. The second problem is that is more basic, which is
that there is a type mismatch.
help please.
formfields formatted as dates. I want a third field to calculate the
number of weekdays between those two dates.
I have started out with this, but it is not working.
Public Sub weekdaysbetween()
ActiveDocument.FormFields("weekdays").Result =
ActiveDocument.FormFields("date2").Result -
ActiveDocument.FormFields("date1").Result
End Sub
I know that this would only calculate the total difference in the
number of days (not only weekdays) if it was working, so that is the
first problem. The second problem is that is more basic, which is
that there is a type mismatch.
help please.