本文介绍了在 PowerPoint 中更改粘贴形状内的字体大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有谁知道如何更改 PowerPoint 中粘贴的形状对象中的字体大小?
Does anyone know how to change the font size within a pasted shape object in PowerPoint?
我能够通过以下方式成功操纵形状:
I was able to successfully manipulate the shape with the following:
ActivePresentation.Slides(1).Shapes(2).Fill.ForeColor.RGB = RGB(255, 0, 0)
但是,当我尝试使用以下内容更改字体大小时,出现错误:
However, when I try to change the font size with the following, I get an error:
ActivePresentation.Slides(1).Shapes(2).TextFrame.TextRange.Font.Size = 12
我正在从 Excel 粘贴数据透视表...我尝试了以下操作,但出现错误:
I am pasting a pivot table from Excel...I tried following but got an error:
Dim oShp As Shape
Dim oTbl As Table
Dim l As Long
Dim j As Long
Set oShp = ActivePresentation.Slides(1).Shapes(1)
Set oTbl = oShp.Table
For l = 1 To oTbl.Columns.Count
For j = 1 To oTbl.Rows.Count
oTbl.Cell(l, j).Shape.TextFrame.TextRange.Font.Size = 16
Next
Next
错误是对象形状的方法表失败.谢谢!
The error was Method Table of object Shape failed. Thanks!
推荐答案
更改索引 (j,l)
oTbl.Cell(j, l).Shape.TextFrame.TextRange.Font.Size = 16
这篇关于在 PowerPoint 中更改粘贴形状内的字体大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!