public void GetInfoForAttachDocument() { // Show path to client order attach and open them word = new WordService(GetPathWithOrderAttach(), false); // Find table with technic specification var tCount = word.GetTablesCount(); for (var iCount = 1; iCount <= tCount; iCount++) { if (word.GetCell(iCount, 1, 1).Contains("Техническая") || word.GetCell(iCount, 2, 1).Contains("Техническая")) { // Delete first two rows word.DeleteTableRows(iCount, new int[2] { 1, 1 }); // Copy left table word.CopyTable(iCount); break; } } // Close order attach word.CloseDocument(false); word.CloseWord(false); }
private static void GetTechSpec(int tableNumber, string orderApplicant) { if (!String.IsNullOrEmpty(orderApplicant) && File.Exists(orderApplicant)) { WordService techSpecWord = new WordService(orderApplicant, false); techSpecWord.CopyTable(tableNumber); Thread.Sleep(4000); techSpecWord.CloseDocument(false); techSpecWord.CloseWord(false); } }