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

  • 相关阅读:
    矿Mac必备软件
    PHP第六课 使用方法数组
    I/O概述和审查操作
    应用程序配置文件
    他毕业两年,博客一年,时间
    苹果公司的回复
    CImage类的介绍与使用
    数据库移植遇到的问题
    MP算法和OMP算法及其思想
    ROR 环境的 搭建
  • 原文地址:https://www.cnblogs.com/kevinkim/p/2307956.html
Copyright © 2011-2022 走看看