gpt4 book ai didi

vba - VBA 中 msoTextOrientationHorizo​​ntal 的常量值是多少?

转载 作者:行者123 更新时间:2023-12-02 05:32:02 24 4
gpt4 key购买 nike

深夜的简单问题...如标题所示,什么是 msoTextOrientationHorizo​​ntal?

我希望在 VBA 中延迟绑定(bind)用于控制 MS PowerPoint 的代码,但似乎无法从 PowerPoint 11.0 库中找到 msoTextOrientationHorizo​​ntal 的常量值。

Dim objPPTApp As Object
Dim oPPSlide As Object
Dim oPPShape As Object
Const ppLayoutBlank = 12

Set objPPTApp = CreateObject("Powerpoint.Application")
Set oPPSlide = objPPTApp.ActivePresentation.Slides.Add(1, ppLayoutBlank)
Set oPPShape = oPPSlide.Shapes.AddTextbox(msoTextOrientationHorizontal, 10, 10, 256, 28)

类似于

Dim objPPTApp As Object
Dim oPPSlide As Object
Dim oPPShape As Object
Const ppLayoutBlank = 12
Const msoTextOrientationHorizontal= 0 '## Value needed

Set objPPTApp = CreateObject("Powerpoint.Application")
Set oPPSlide = objPPTApp.ActivePresentation.Slides.Add(1, 12)
Set oPPShape = oPPSlide.Shapes.AddTextbox(msoTextOrientationHorizontal, 10, 10, 256, 28)

感谢大家的支持!

最佳答案

来自“Microsoft Office 14.0 对象库”:

typedef enum {
msoTextOrientationMixed = 0xfffffffe, // -2
msoTextOrientationHorizontal = 1, // <<-- This is the one you need
msoTextOrientationUpward = 2,
msoTextOrientationDownward = 3,
msoTextOrientationVerticalFarEast = 4,
msoTextOrientationVertical = 5,
msoTextOrientationHorizontalRotatedFarEast = 6
} MsoTextOrientation;

关于vba - VBA 中 msoTextOrientationHorizo​​ntal 的常量值是多少?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12231435/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com