Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying to write a macro that will automatically select the last 13wks when a button is clicked.
I have tried
[ ActiveDocument.Fields(
"PickupWkStart"). Select ">=weekstart(Today(), 0, -1)-13"] ]
I found this selects every week availabel not just the ones i want. Any ideas?
The PickupWkStart field is just teh sunday of the week in standard MM/DD/YYYY format.
Thanks
Sending again:
sub Semanas4
ActiveDocument.GetField("Year").Select ActiveDocument.Evaluate("year(today(1))")
ActiveDocument.GetField("Semana").Select ActiveDocument.Evaluate("'>'
<div><pre> & num(week(today(1))-4) & '<=' & num(week(today(1)))")
end sub
Hello Pat,
This macro will selesct the last 13 weeks of the current year.
sub week13
ActiveDocument.GetField("Year").Select ActiveDocument.Evaluate("year(today(1))")
ActiveDocument.GetField("week").Select ActiveDocument.Evaluate("'>' & num(week(today(1))-13) & '<=' & num(week(today(1)))")
end sub
Sending again:
sub Semanas4
ActiveDocument.GetField("Year").Select ActiveDocument.Evaluate("year(today(1))")
ActiveDocument.GetField("Semana").Select ActiveDocument.Evaluate("'>'
<div><pre> & num(week(today(1))-4) & '<=' & num(week(today(1)))")
end sub