Both Termidor SC (fipronil for termites) and Bora-Care will work, but Bora-Care is typically the better one to use for this situation. Termidor is not a wood treatment product, so for it to work you have to drill holes EXACTLY where the termites are and it has to touch the termites to work. If you miss where they are, it will not work. Also, Termidor does not really have any residual in the wood, so after you treat inside the wood with Termidor and it dries, that wood is exposed for future termite and beetle infestations.
Termidor: http://www.domyownpestcontrol.com/termidor-sc-p-184.html
Bora-Care is usually the preferred choice if most of the wood is exposed and it is raw wood you are treating, meaning it is not painted, stained, or sealed, it is just normal wood. Bora-Care is made only for wood, and you do not have to know exactly where the termites are for it to work which is a plus. Bora-Care is sprayed evenly over all exposed surfaces of the wood and actually penetrates through the entire piece of wood. When the termites in the wood try to consume the wood after it has been treated, they ingest the Bora-Care with the wood and die. No matter where they are in the wood the Bora-Care will find them as long as you treated the exposed wood that you can see. The other main benefit is that Bora-Care stays in the wood forever, so you will not have to worry about termites or beetles infesting the wood that you treated ever again.
Bora-Care: http://www.domyownpestcontrol.com/boracare-p-100.html
You can foam Boracare into the wall voids. The insulation may soak up a bit of the applications but here is how the pros handle it:
You will need to use a stud finder to locate each stud. You should then drill a hole at the top of the wall on either side of each stud and you should drill a second set of holes at the bottom of the wall on either side of each stud. You will apply the foam using the top holes and you will know the foam has successfully coated the wood when it comes out of the bottom holes on either side of the studs.
Boracare can create a crystal-like residue if heavily applied. You can wipe the residue away with water and soap.
Bora-Care will take at least 30 days usually to diffuse through the entire piece of wood. This of course depends on the thickness and moisture content of the wood. It starts to work as soon as it begins to penetrate the wood it is applied to. You may continue to see activity in wood that has a prior infestation as Boracare works by ingestion so will only kill the insects that are actively eating the wood and ingest the product. If there are dormant beetles that are not active, but become active later, let's say next year, you could see new activity at that time, but they will die once they start eating since Bora-Care stays in the wood forever. It is common to see activity at a later date since beetles are not all active at the same time.
Bora-Care will take up to 30 days or more to penetrate all the way through the wood and eliminate a drywood termite colony in the wood.
Just so you know, Bora-Care will not kill, treat, or prevent mold growth. It only works for fungus or wood destroying insects, not mold. Only Bora-Care with Mold Care will treat and kill and prevent mold. Bora-Care will take at least 30 days usually to diffuse through the entire piece of wood. This of course depends on the thickness and moisture content of the wood. The outer layer though usually dries within 24 hours or at least is OK after 24 hours to treat again or apply a stain or sealant to the wood.
If the beam is raw wood, you can treat all 4 sides using Boracare at 1:1 ratio. Boracare will penetrate into the wood and will kill active Powder post beetles.