Infoga WordArt-objekt


I MS Excel kan vi inte skapa vattenstämplar såsom i MS Word utan det vi kan skapa är WordArt-objekt.  Här i detta tips visar hur vi skapar ett textobjekt i WordArt.

 

Option Explicit  

Sub Skapa_WordArt_Text()

   '© 2002 Alla rättigheter XL-Dennis

   Dim stText As String

    stText = InputBox("Ange text för WordArt-bilden")

    If stText = "" Then Exit Sub

 

   With ActiveSheet.Shapes.AddTextEffect( _

         PresetTextEffect:=msoTextEffect9, Text:=stText, _

         FontName:="Arial Black", FontSize:=18, FontBold:=False, _

         FontItalic:=False, Left:=10, Top:=10)

      .ScaleWidth 2, False, msoScaleFromTopLeft

      .ScaleHeight 2, False, msoScaleFromBottomRight

      With .Fill

         .Visible = True

         .Solid

         .ForeColor.SchemeColor = 25

         .Transparency = 0.5

      End With

      .Shadow.Transparency = 0.5

      .Line.Visible = False

      'WordArt-bilden placeras med start i den aktiva cellens vänstra hörn upptill.

      .Top = Selection.Top

      .Left = Selection.Left

   End With

 End Sub