How formal is 如何 in the context of 最近如何?
IMO, 最近如何 is a little formal, while 最近怎么样 is much natural and genial. 

Anyway, I think it's OK for a formal social occasion.

BTW: When 如何 is used in the context for how to do sth such as 如何刻录dvd, it's normal.