I'm sure there are much more professional ways to do this - but what works for me? Packing tape (the clear stuff). I put it directly on the carpeting and use a plastic putty knife and tuck it between the carpet and the wall prior to painting. Then remove when you're all done. It's worked great for me for several projects - give it a try!