I have had this happen to me at every single job except my current one (we have a female CEO and female VPs).
Also, we expect junior people to do tasks seniors don't want to do. Don't make a big deal if junior men are also asked to make copies or whatever.
For the last 40 years, my response has been:
"I'll get Mary in admin to do this for you."
or
"Admin is the third door on the right. I work in Software Development." (this one is best for total strangers you have never seen before.)
It gently makes the point that you are not in admin and let'slets him know who should be doing it.
For the hard core who don't get it after a gentle reminder, I tell them what I am working on in some nasty technical detail and ask if this is higher priority. Surprisingly, sometimes it is.
If you are not junior and he persists, delegate it to a male who is junior. (for those who object to this, I am not saying all suck tasks should go to junior men, only that she needs to do it to make a point that isif this is unacceptable for the man to do it (as it likely would be), it is unacceptable to ask the senior woman to do it as well. Delegating to a junior woman doesn't make that point.)