zoukankan      html  css  js  c++  java
  • word 修改 表宽度

    Private Sub Document_New()


    For Each tb In ThisDocument.Tables
      
       tb.AllowAutoFit = False
      
       For Each col In tb.Columns
      
         col.Width = 50
        
       Next
      
      
    Next


     

    For Each oTable In ThisDocument.Tables

       Dim oCols As Integer
      
       oCols = oTable.Columns.Count
      
         For Each oCol In oTable.Columns

            If oCols = 2 Then
               Select Case oCol.Index
                 Case 1
                 oCol.Width = 120
                 Case 2
                  oCol.Width = 130
                 
             End Select
           
            End If
           
            If oCols = 4 Then
           
                Select Case oCol.Index
                Case 1
                   oCol.Width = 120
                  
                Case 2
                   oCol.Width = 130
                  
                Case 3
                   oCol.Width = 60
                  
                Case 4
                   oCol.Width = 80
                  
               End Select
              
            End If
           
            Next oCol
           
             
        Next oTable

    End Sub

  • 相关阅读:
    转:单链表有环判断及其起始位置定位
    转:C++经典排序算法总结
    转:堆排序
    转载:C++快速排序
    转载:平衡二叉树(AVL Tree)
    设计模式原则
    适配器模式
    单例模式
    工厂模式
    Head First设计模式 装饰者模式
  • 原文地址:https://www.cnblogs.com/kevinkim/p/2307956.html
Copyright © 2011-2022 走看看