In regards to dotnet 6 and framework 4.7
, you can't mix these two frameworks. Let's say the office code is in 4.7 framework and the .NET Core 6 consumes it, this will not work.
You need to use .NET Core 6 for everything or Framework 4.7 for everything.