I believe that you are thinking of a ranger spell called Arrowmind from the spell compendium.One of the d20 books had a feat that let you attack with a bow without provoking AoOs, if you took a penalty to your attack roll (-2 IIRC). I want to say it was from one of Fantasy Flight's Legends & Lairs books, but I really don't remember for sure.