Agree. If you feel hungry at work then drink more tea/coffee as those are rich in caffeine and no calories if you drink black with no sugar.
Also, never have loose dollar bills or change within ready access for your weak moments. You should get to a point where you can walk past a vending machine with your head held high and not blink!