I am building an addition and will have a pipe from the baseboard heat pass from one room to the next. I want to soundproof the room - so can I use a spray on foam on the baseboard pipe to seal the hole on the wall between the two rooms? Will a certain type of foam hold up against the heat of the water passing through the pipe?
Ordinary silicone caulk is good to 400 degrees. But you can't paint it.
If you want to get fancy
You can be fire stop caulking at Lowes or Home Depot. It is caulking to seal a firewall say between a shop and an office. Don't know about painting it.But would think so. The stuff I have seen is reddish color. Be sure and check the temperature rating before you buy it.
This is a requirement in some applications.