Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: vba macro to insert wordart "watermark"

  1. #11
    MrExcel MVP Damon Ostrander's Avatar
    Join Date
    Feb 2002
    Location
    Denver, Colorado USA
    Posts
    4,239
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: vba macro to insert wordart "watermark"

    Hi slirfeldt,

    Here is a way to easily remove the watermark. I added a line to the original macro that adds the watermark to give it a name. Then the delete macro can easily find it to delete it. Here is the updated code for both macros:

    Code:
    Sub AddWatermark()
    
    ' Inserts a wordart "watermark" onto the current sheet with its
    ' upper left corner positioned on the upper left corner of the
    ' selected cell.
    
       Dim StrIn As String
       StrIn = InputBox("Enter watermark text")
       If StrIn = "" Then Exit Sub
       
       With ActiveSheet.Shapes.AddTextEffect(msoTextEffect9, StrIn, _
          "Arial Black", 36#, msoFalse, msoFalse, _
          10, 10)
          .ScaleWidth 2, msoFalse, msoScaleFromTopLeft
          .ScaleHeight 2, msoFalse, msoScaleFromBottomRight
          .Fill.Visible = msoTrue
          .Fill.Solid
          .Fill.ForeColor.SchemeColor = 26
          .Fill.Transparency = 0.5
          .Shadow.Transparency = 0.5
          .Line.Visible = msoFalse
          'position at cell corner
          .Top = Selection.Top
          .Left = Selection.Left
          .Name = "MyWatermark"
       End With
    
    End Sub
    
    Sub DelWatermark()
       ActiveSheet.Shapes("MyWatermark").Delete
    End Sub
    Damon

  2. #12
    New Member
    Join Date
    Apr 2013
    Posts
    1
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: vba macro to insert wordart "watermark"

    Hello! is there any macro coding which converts three cells text into three separate wordarts in a separate ms word file?

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •