PowerPoint 自动化 c++改变文字大小

发布于 2024-12-21 05:47:30 字数 154 浏览 3 评论 0原文

我正在用 c++ 将图表添加到 powerpoint 2007 幻灯片中,所有内容都在添加,但我不知道如何更改 font size。如果有人知道如何在 powerpoint 2007 中执行此操作或知道在哪里可以找到解决方案,那就太好了,谢谢

I am working on adding a chart to a powerpoint 2007 slide in c++ and everything is adding but I cannot find out how to change the font size. If anyone knows how to do this for powerpoint 2007 or know where to find a solution, that would be great thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

沫尐诺 2024-12-28 05:47:31

你的桌子是一个形状。该形状有一个返回 Table 对象的 .Table 方法。

要设置文本大小,请使用类似以下内容(用 VB/VBA 语言):

With oTbl  ' a reference to the table object
  For x = 1 to .Rows.Count
    For y = 1 to .Columns.count
      With .Cell(x,y).Shape.TextFrame.TextRange
        .Font.Size = 8  ' or whatever you want
      End with
    Next
  Next
End With

如果表格单元格的高度/宽度不足以容纳新大小的文本,则文本不会更改大小。恼人的。

Your table is a shape. The shape has a .Table method that returns a Table object.

To set the text size, use something like this (in VB/VBA-speak):

With oTbl  ' a reference to the table object
  For x = 1 to .Rows.Count
    For y = 1 to .Columns.count
      With .Cell(x,y).Shape.TextFrame.TextRange
        .Font.Size = 8  ' or whatever you want
      End with
    Next
  Next
End With

If the table cell's height/width aren't large enough to accommodate the newly sized text, the text won't change size. Annoying.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文