To make an NPC close a door is a bit tricky as it is not native to the game. You would have to script his movements with AI packages and forcing the animation yourself. This can get cumbersome if you have a lot of random NPCs closing a lot of random doors at random times.
If you want, you can place this script on your door and they will automatically close and lock (if originally set to be locked) 10 seconds after they are opened.
ScriptName UCDoorScriptFloat TimerBegin OnLoad ; if the player left the door open the last time he was in here, close it. If GetOpenState == 1 SetOpenState 0 If GetLockLevel > 0 Lock EndIf EndIfEndBegin OnActivate Set Timer to 10 ActivateEndBegin GameMode If Timer > 0 Set Timer to Timer - GetSecondsPassed ElseIf GetOpenState == 1 SetOpenState 0 Set Timer to 0 If GetLockLevel > 0 Lock EndIf EndIf If GetOpenState == 3 Set Timer to 0 EndIfEnd