A projector formulation for the Van Vleck transformation