This is the Visual Studio 2022 .NET Core demo.
If you have MS Word installed, first refer to the COM reference:
using StackOverflowCSConsoleApp1
using winword=Microsoft.Office.Interop.Word;
MyClass.How_can_I_count_rows_of_a_Table_in_a_Word_document_with_CSharpHow_can_I_count_rows_of_a_Table_in_a_Word_document_with_CSharp();
namespace StackOverflowCSConsoleApp1 {
    public static class MyClass
    {
        
        public static void How_can_I_count_rows_of_a_Table_in_a_Word_document_with_CSharpHow_can_I_count_rows_of_a_Table_in_a_Word_document_with_CSharp()
        {
            //winword.Application app = new Microsoft.Office.Interop.Word.Application();
            winword.Application app = new winword.Application();
            const 



 
    
Top comments (0)