Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I need to select two different date range in the same selection, it's possibile?
es. 01/01/2009 - 31/01/2009 and 01/02/2010 - 28/02/2009
I try to use this macro
sub FiltroDate
set vA=ActiveDocument.Variables("FromDateDoc")
set vb=ActiveDocument.Variables("ToDateDoc")
set vC=ActiveDocument.Variables("FromDateDoc2")
set vD=ActiveDocument.Variables("ToDateDoc2")
Set repFld = ActiveDocument.GetField("DateDoc")
repFld.Select "(>=" + FormatDateTime(vA.GetContent.String) + " <=" + FormatDateTime(vB.GetContent.String) + ") or ( >=" + FormatDateTime(vC.GetContent.String) + " <=" + FormatDateTime(vD.GetContent.String) + ")"
but does not work
Thanks
TIP: In this expressions you can use the same expressions you use in the listboxe's search. Use them to test your expressions, then use it in your macro.
I used a listbox object but when I use the search is ....... Datedoc xxxxx of yyyyyy