傍晚的简单问题......就像标题所说,什么是msoTextOrientationHorizontal?
我希望迟到绑定用于在VBA中控制MS PowerPoint的代码,但似乎无法从PowerPoint 11.0库中找到msoTextOrientationHorizontal的常量值。
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)
感谢您的支持!
答案 0 :(得分:3)
从“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;
答案 1 :(得分:2)
更一般地说,您了解对象浏览器?打开要自动执行的应用程序(或设置对它的引用),然后在IDE中按F2。您将能够在最底层的窗格中搜索您所使用的常量并找到其值。