According to Do-It-Yourself Pest Control, using an appropriate insecticide dust helps to control wood boring bees. Once the bees exit, most eventually die from the poison. Filling the channels they have created with caulk and painting the surface discourages their return, according to About.com Insect section.
Wood boring bees are carpenter bees. They bore holes in wood in order to nest. The best time to spray is as the outdoor temperatures begin to warm; this signals the bees that it is time to mate. When applied with a puffer at this time, the bees must crawl through the dust to exit their nests to mate, allowing the homeowner to fill the holes and prevent their return. Homeowners must be cautious not to seal any unhatched bees inside the wall with caulk. Once they mature, they cut new holes through the wood to exit. Since these new holes are not treated, the bees escape to breed again, increasing the damage.
While carpenter bees damage wood, the problems they cause are much less significant than that caused by termites, according to About.com. Termites eat the wood, but carpenter bees bore holes inside to form their nest. If the nests are not treated, the bees tend to return to the same location year after year. In the process of refurbishing the nest to serve as the next generation of offspring, they cause cumulative damage, which is often more significant.