Exemplo n.º 1
0
        public static void criarTabela(string ln, string cl, TableConfigWindow tableconf)
        {
            Word.Document doc = Globals.ThisAddIn.Application.ActiveDocument;

            int linha, coluna;

            Int32.TryParse(ln, out linha);
            Int32.TryParse(cl, out coluna);

            Word.Range rg  = Globals.ThisAddIn.Application.Selection.Range;
            var        tab = doc.Tables.Add(rg, linha, coluna);

            try
            {
                tab.set_Style("Tabela com grade");
            }
            catch (System.Runtime.InteropServices.COMException e)
            {
                tab.set_Style("Table Grid 8");
                Console.WriteLine(e);
            }

            tableconf.Close();
        }
Exemplo n.º 2
0
        public static void inserirTabela()
        {
            TableConfigWindow tableconf = new TableConfigWindow();

            tableconf.Show();
        }