If you suspect you have a carpenter ant colony in one of your trees, you can thwart their travels by establishing a band of very sticky material around the trunk of the tree about 3 feet off the ground. This sticky material is not affected by rain or the weather. This band keeps the ants already in the tree from getting out into the yard to search for food and it prevents those already outside from getting back to the colony. If the colony is very large, you may still wish to use some form of insecticide to kill it off, but this technique will serve to slow things down if not completely eliminate the problem. For sure, those ants in the tree are not going to get into the house.
Tip-- To shut off all avenues for the ants, trim back any branches that are touching the house, another tree, or a fence post.