
![]()
Home | About Us | Consulting | Tips and Tricks | Presentations | Contact Us
Tip #8:
When I am add limits via Javascript, as each limit is added the entire result section recalculates. Can I only control when the recalculation is done?
Whenever you change a limit, the result set is automatically recalculating for the change. If you are going to make multiple changes and want the recalculation to occur only after the last change. Try this:
var MyLimit = ActiveDocument.Sections["Results Section"].Limits["Limit Column"]
MyLimit.SuspendCalculation = trueMyLimit.SelectedValues.RemoveAll()
MyLimit.SelectedValues.Add("First Selection")
MyLimit.SelectedValues.Add("Second Selection")
MyLimit.SelectedValues.Add("Third Selection")
MyLimit.SuspendCalculation = falseActiveDocument.Sections["Results"].Recalculate()
Copyright © Hairsine Associates, 219 Rainbow Drive PMB 11917, Livingston, TX 77399. All Rights Reserved.
Return to Tips and Tricks Home Page click here...