Office automation (COM interop) is a desktop feature and not recommend for use on a server.
Alternatively, please suggest other options for converting Word files to PDF.
Search NuGet for a Word to PDF .NET Framework library. There are a lot of libraries to choose from. Read the docs and find a solution that fits your needs.