Office applications assume that they are being run under an interactive desktop.
In some circumstances, applications may need to be made visible for certain Automation functions to work correctly. If an unexpected error occurs, or if an unspecified parameter is needed to complete a function, Office is designed to prompt the user with a modal dialog box that asks the user what the user wants to do.
A modal dialog box on a non-interactive desktop cannot be dismissed. Therefore, that thread stops responding (hangs) indefinitely. Although certain coding practices can help reduce the likelihood of this issue, these practices cannot prevent the issue entirely. This fact alone makes running Office Applications from a server-side environment risky and unsupported.
This is also described in a technical Microsoft Article
As a consequence of those considerations we don't recommend the "Refresh Office File" and "Broadcast" Procedure Commands if executed in User Log-Off Mode.