First things first, start by expressing some concern for his health. I've been sick for a week now, and when I'm sick, I'm usually a bit grumpy. That means that I have a tendency to be on edge. I think that holds for people in general; a two-week cold means that your coworker is probably pretty miserable. It also means that the cold could be more serious than a passing cold (although it could also be allergies, depending on where you are).
Therefore, I'd start with
Are you okay? It seems like you've been sick for a while now. I hope you're not feeling too bad.
Ideally, they appreciate that you care for their well-being (and I assume you do, to some extent), and might say as much. This puts them in a slightly better mood to respond to your next question:
Would you mind being a bit more careful when you sneeze? I know that you want to keep working at the office while you're sick, but I also want to make sure that everyone else stays healthy while you recover.
What this does:
- It lets him know that you're asking for the good of the office as a whole.
- It acknowledges that the person is trying to keep getting work done, while they probably just want to lie in bed and not have to deal with . . . work.
- It phrases things as lightly as possible. It also isn't aggressive or accusatory; it doesn't say "You're responsible for getting everyone sick here!" (even though they might be).
And if it turns out to just be allergies - well, maybe you can sympathize, although it could then be a longer-term problem.