Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
simongoodman
Creator
Creator

Preselect a date on opening a document

I want the document on opening to select the last data working week. I know about Document Properties/Triggers/Document Event Trigger/OnOpenHasAction. So for example for Oct to Sep as the financial year if the last working date is 16/11/2012 then the working week should be 7.

My problem is I have target data till 30/09/2013, so =maxstring(week) would return week 52. I have tried a number of ideas unsucessfully including a version of =Weektoday().

Please can someone point me in the right direction. The script is attached.

1 Solution

Accepted Solutions
Gysbert_Wassenaar

try week(addmonths(LastWorkingDate,-9))


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar

try week(addmonths(LastWorkingDate,-9))


talk is cheap, supply exceeds demand
simongoodman
Creator
Creator
Author

Thanks I think that did the trick.