From Hadhrat Mufti Taqi Usmani Sahab’s (damat barkatuhum) ‘Islahi Khutbat’:
One method of showing honour to someone is to stand up for him. The instructions of shari’ah in this regard are that if the visitor expects other people to stand up for him then we must not stand up because his desire indicates that he is arrogant and thinks that he is arrogant and thinks little of other people. However, if the visitor does not expect anyone to stand up for him then there is no harm to stand up to honour such a man for his knowledge, piety or the high office he holds. It is neither a sin to stand up nor necessary to do so.
HADITH CONFIRMS THE STANDING UP
The Prophet (Sallallahu Alayhi Wasallam) instructed his companions (radhiallahu anhum) on some occasions that they should stand up. Accordingly, when Sa’d bin Muaz (radhiallahu anho) arrived to judge the case of the Banu Qurayzah, the prophet & commanded them:
“Stand up for your chief.”
Thus, it is proper to stand up on such occasions, but if anyone does not stand up then there is no harm. Nevertheless, we are definitely urged in a hadith that we should at least move at our places and not remain rooted like a statue when someone comes to us, and we must display pleasure on his coming so that he may feel that he is honoured.
[‘Discourses on Islamic Way of Life’: Vol. 10, pages 203/204]