Exemple #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);
            }
        }
Exemple #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();
 }