Can I get a dividend “free lunch” by buying a stock just before the ex-dividend date and selling it immediately after? [duplicate]
There are indeed various strategies to make money from this. As Ben correctly said, the stock price drops correspondingly on the dividend date, so the straightforward way doesn't work. What does work are schemes that involve dividend taxation based on nationality, and schemes based on American Options where people can use market rules to their advantage if some options are not exercised.