Hi @Sunil Ferro ,
Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment.
For more information, please visit Considerations for server-side Automation of Office.
So I suggest you to use Open XML SDK
to manipulate Office documents or use 3rd party library.
You could visit Word processing (Open XML SDK) to see several samples.
https://learn.microsoft.com/en-us/office/open-xml/word-processing?redirectedfrom=MSDN
3rd party library:Free Spire.Doc、Aspose、textcontrol
Best regards,
Lan Huang
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.