When you edit the vba code in a template it often (always?) kills off the ribbon instance for that template. The easy fix is to close and reopen that template.
If you wanted to develop a method of being able to recreate the ribbon instance because you can't live with the easy fix, you can get some excellent guidance from this link. That code is for Excel and stores a Long value in a place that won't work in Word but the code should be easily adaptable for a Word solution.
Refresh Ribbon UI In Your Custom Excel Add-in