I don't know the tax consequences, but buying for the div and selling the next day or so should be roughly a wash minus your commisions and what you pay to get in and out of the stock. All thing being equal its a loser and you wait 2 weeks for the money.
I've no intention of selling X-dividend. Rather, I'm looking for a price increase early in December as those who sold on the news of the Canadain tax on trusts are allowed to buy back in after 30 days.
Then, I'll only sell when the MACD charts give a sell signal.