Esempio n. 1
0
        public void SetColumnWidth(int Column, double Width_, int indTable = -1)
        {
            GetTableReference(indTable);

            MSWord.Columns pColumns = m_pTable.Columns;
            if (pColumns == null)
            {
                return;
            }
            int cntColumns = pColumns.Count;

            if (Column >= 1 && Column <= cntColumns)
            {
                MSWord.Column pColumn = pColumns[Column];
                if (pColumn == null)
                {
                    return;
                }
                float w = m_pApp.MillimetersToPoints((float)Width_);
                if (Math.Abs(w) >= 0.009)
                {
                    pColumn.Width = w;
                }
                else
                {
                    pColumn.Delete();
                }
                //pColumns[Column].SetWidth(w, MSWord.WdRulerStyle.wdAdjustSameWidth);
            }
        }
Esempio n. 2
0
 public void DeleteColumn(int indCol, int indTable)
 {
     GetTableReference(indTable);
     MSWord.Columns pCols = m_pTable.Columns;
     if (pCols == null)
     {
         return;
     }
     MSWord.Column pCol = pCols[indCol];
     pCol.Delete();
 }
Esempio n. 3
0
        private void Pregunta4()
        {
            p1 = "INCORRECTO";
            Word.Tables tablas = docAlumno.Tables;
            if (tablas.Count == 1)
            {
                Word.Table tabla    = tablas[1];
                int        filas    = tabla.Rows.Count;
                int        columnas = tabla.Columns.Count;

                Word.Columns col = tabla.Columns;

                if (filas == 5 && columnas == 2 && col.Last.Width == col.First.Width)
                {
                    p1 = "CORRECTO";
                }
            }

            GuardarPuntaje();
            CerrarWords();

            BorrarPreguntasTemporales();
        }