Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear All,
Please look into the piece of code
set FD = ActiveDocument.Variables("From Date") '' variable for Initial date
FrmDtt=(FD.GetContent.String)
if ToDtt>now() then
msgbox "Order To Date can not be greater than Today, Please choose proper date"
set v = ActiveDocument.Variables("To Date")
v.SetContent Now(),true
if condition is always true and i tried to convert it number using num , but it say type mismatch in macro .
working fine in frontend
Regards
Pramod Kumar
used variable to compare
thanks
Pramod Kumar
Use the Evaluate API function with QV expressions.
If ActiveDocument.Evaluate("if $(FromDate)>now()") Then
-Rob