vbscript [创建表格图例]在PowerPoint #PowerPoint中创建一行迷你表格图例

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了vbscript [创建表格图例]在PowerPoint #PowerPoint中创建一行迷你表格图例相关的知识,希望对你有一定的参考价值。

Sub TableLegend()

'Create a mini table legend (one-row, even-number of columns)
'Odd number columns are always small squares.
'Even number columns are for labels - therefore long rectangles


'r converts cm to points
r = 28.3464567

'ActiveWindow.Selection.ShapeRange.Top = 5.17 * r
'ActiveWindow.Selection.ShapeRange.Left = 1.67 * r

nrow = ActiveWindow.Selection.ShapeRange.Table.Rows.Count
ncol = ActiveWindow.Selection.ShapeRange.Table.Columns.Count

For j = 1 To ncol
    For i = 1 To nrow
        ActiveWindow.Selection.ShapeRange.Table.Cell(i, j).Shape.TextFrame.TextRange.Font.Size = 10
    Next
Next

ActiveWindow.Selection.ShapeRange.Table.Rows(1).Height = 0.6 * r

For i = 1 To ncol Step 2
    ActiveWindow.Selection.ShapeRange.Table.Columns(i).Width = 0.6 * r
Next

For i = 2 To ncol Step 2
    ActiveWindow.Selection.ShapeRange.Table.Columns(i).Width = 3.2 * r
Next

End Sub

以上是关于vbscript [创建表格图例]在PowerPoint #PowerPoint中创建一行迷你表格图例的主要内容,如果未能解决你的问题,请参考以下文章

产品必备工具及需求文档简介

如何在谷歌电子表格图中编辑图例标签?

VBscript 在 MS Access 2010 中制作问卷表格

excel的图标如何设置标题、图例

表格中图例周围的边框不显示

使用 jquery 显示图例