J
Jen
Help to manipulate/assign result CalculateAge to my ActiveDocument screen,
assign it toa DocProp or DocVariable
and a ContentControl
or the ActiveDocument screen at a bookmark please?
I can read result CalculateAge in a MsgBox fine.
Function Calculate(birthDate As Date) As Byte
Dim birthdayNotPassed As Boolean
birthdayNotPassed = CDate(Month(birthDate) & " / " & _
Day(birthDate) & " / " & _
Year(Now)) > Now
CalculateAge = Year(Now) - Year(birthDate) + birthdayNotPassed
End Function
assign it toa DocProp or DocVariable
and a ContentControl
or the ActiveDocument screen at a bookmark please?
I can read result CalculateAge in a MsgBox fine.
Function Calculate(birthDate As Date) As Byte
Dim birthdayNotPassed As Boolean
birthdayNotPassed = CDate(Month(birthDate) & " / " & _
Day(birthDate) & " / " & _
Year(Now)) > Now
CalculateAge = Year(Now) - Year(birthDate) + birthdayNotPassed
End Function