I have known Bob for some five years - followed a few courses together, then worked closely together on a few projects, and now we share an office but work on largely separate things. Because we are both working part-time at home or elsewhere as well, we only meet each other twice a week or so.
Over the last several months (perhaps a year or so) I feel Bob has become very self-centered. Lots of things happened in his life (think marriage, house, children), so I can kind of understand, but he has also become very self-centered in conversations about more trivial topics (think DIY, gardening, cooking). In principle I like to hear what he makes/grows/cooks, but don't expect to hear the details of all the different kinds of screws/potting soil/olive oil without asking for it. When I move the conversation to something we have in common, or bring up something of my own, he does not say anything relevant but instead starts talking about one of his topics, only tangentially related to what I said.
Because we don't live close, a lot of our communication naturally goes over WhatsApp. I get sent photos and links of all kinds of things, and my first though with most of these messages is: what made him think that I would be interested in this? I usually don't reply, get a new, unrelated message the next day, don't reply, etc., and on the third-or-so message I reply with something like "yes, nice" and a lame excuse that I'd been busy. Somehow this does not get the message across that I'm not interested.
In the past me and my partner have visited them and vice versa. It is now clearly our turn to host them (we visited them several times, they us only once or twice), and we have invited them in more and less explicit ways over the past year. The last reply to this was (in-person) that it was too complicated for them to come, but that we are always welcome. I found that quite rude, since it suggests that they would be more important to us than vice versa. Furthermore I know for a fact that they visited others in our area. So we don't invite them anymore.
At this point I've given up on this friend. But because we share an office, I cannot avoid him altogether. I want to continue to have lunch with my other colleagues and can bear him in this context, but would like our relationship to become more strictly professional. His continuous stream of text messages causes some distress, since they are at times provoking or plain incorrect about things I care about (anything from religion to the software we use).
I may have been sending some mixed signals (not replying to messages but still inviting them over), but only in situations where it felt utterly rude to disengage.
How can I more clearly communicate to this person I want our relationship to become more strictly professional?
(Context: we are well-educated western Europeans. There may be some form of asperger involved from both sides.)