在PowerPoint2013分之2010,如何使用VBA之上保持水印始终(In PowerPoin

2019-10-20 05:33发布

我使用的是小VBA程序应用在后台的一些文字。 我能够运用水印,但如果我在演示文稿中使用任何图像,然后水印去的形象背后。 有没有办法在前面始终保持水印。 我使用此代码应用水印:

Dim cntDesigns As Integer
cntDesigns = ActivePresentation.Designs.Count

For iter = 1 To cntDesigns
    Dim curDesign As Design
    Set curDesign = ActivePresentation.Designs.Item(iter)

    ' EnumerateMasters
    Dim masterCount As Integer  
    masterCount = 1
    Dim masters(100) As Master
    Set masters(masterCount) = curDesign.SlideMaster

    Dim cntLayouts As Integer
    cntLayouts = curDesign.SlideMaster.CustomLayouts.Count
    For Layout = 1 To cntLayouts
        Dim curLayout As CustomLayout
        Set curLayout = curDesign.SlideMaster.CustomLayouts(Layout)

        If curLayout.DisplayMasterShapes = msoFalse Then
            masterCount = masterCount + 1
            Set masters(masterCount) = curLayout
        End If
    Next Layout

    For masterIter = 1 To masterCount
         Dim shape As shape
        Set shape = masters(masterIter).Shapes.AddTextbox(msoTextOrientationHorizontal, 0#, 0#, 100#, 100#)
        shape.TextEffect.Text = "Watermark"
        shape.Height = 100
        shape.Width = 100
        shape.TextFrame2.WordWrap = msoTrue
        shape.TextFrame2.WarpFormat = msoWarpFormat1
        shape.Left = 100
        shape.Top = 200

    Next masterIter
Next iter

Answer 1:

没有,什么你把东西顶将覆盖它。 有没有“保持这种形状在上面”命令。

你可以,但是,陷阱一个或多个事件有可能经常发生(选择改变,例如),并让该事件触发的代码看起来在幻灯片上的(一个或多个),每个形状和你的水印形状移到前面,如果它不是已经在那了。



文章来源: In PowerPoint 2010/2013, how to keep watermark always on top using VBA