Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Bon Bon is offline
external usenet poster
 
Posts: 23
Default How to remove watermark

Hello all

I created a watermark in each sheet. When I run my WatermarkGone macro,
all watermarks and pictures/graphics are removed. But, I want to remove
the watermark only. How can I do that? Please give me some advices.

Here are my Watermark and WatermarkGone code:

Sub WaterMarkerGone()
Dim intSheet As Integer
Dim wkBook As Workbook
Dim wkSheet As Worksheet
Dim intShape As Integer
Dim totalCount As Integer
Dim totalShapes As Integer

totalCount = ActiveWorkbook.Worksheets.Count
For intSheet = 1 To totalCount
Set wkSheet = ActiveWorkbook.Worksheets(intSheet)
totalShapes = wkSheet.Shapes.Count
Do While totalShapes 0
wkSheet.Shapes(totalShapes).Delete
totalShapes = totalShapes - 1
Loop
Next intSheet
End Sub

Sub Watermark()
Dim wkSheet As Integer
Set myDocument = ActiveWorkbook

For wkSheet = 1 To ActiveWorkbook.Sheets.Count
Set myWatermark = myDocument.Worksheets(wkSheet).Shapes.AddTextEffec t(
_
PresetTextEffect:=msoTextEffect2, _
Text:="Draft", _
FontName:="Arial Black", _
FontSize:=36, _
FontBold:=False, _
FontItalic:=False, _
Left:=318.75, _
Top:=159.75)
With myWatermark
Name = "Dum"
.IncrementRotation -43.46
.Fill.Visible = msoFalse
.Fill.Transparency = 0.5
.Fill.Solid
.Fill.ForeColor.SchemeColor = 22
.Line.Weight = 0.75
.Line.DashStyle = msoLineSolid
.Line.Style = msoLineSingle
.Line.Transparency = 0#
.Line.Visible = msoTrue
.Line.ForeColor.SchemeColor = 22
.Line.BackColor.RGB = RGB(255, 255, 255)
.ZOrder msoBringToFront
End With
Next wkSheet
End Sub

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default How to remove watermark

Hi Bon,

Try:

'=============
Sub WaterMarkerGone()
Application.ScreenUpdating = False
Dim page As Integer
For page = 1 To Application. _
ExecuteExcel4Macro("GET.DOCUMENT(50)")
On Error Resume Next
ActiveSheet.Shapes("Dum").Select
Selection.Cut
Next page
Application.CutCopyMode = False
End Sub
'<<=============

---
Regards,
Norman


"Bon" wrote in message
oups.com...
Hello all

I created a watermark in each sheet. When I run my WatermarkGone macro,
all watermarks and pictures/graphics are removed. But, I want to remove
the watermark only. How can I do that? Please give me some advices.

Here are my Watermark and WatermarkGone code:

Sub WaterMarkerGone()
Dim intSheet As Integer
Dim wkBook As Workbook
Dim wkSheet As Worksheet
Dim intShape As Integer
Dim totalCount As Integer
Dim totalShapes As Integer

totalCount = ActiveWorkbook.Worksheets.Count
For intSheet = 1 To totalCount
Set wkSheet = ActiveWorkbook.Worksheets(intSheet)
totalShapes = wkSheet.Shapes.Count
Do While totalShapes 0
wkSheet.Shapes(totalShapes).Delete
totalShapes = totalShapes - 1
Loop
Next intSheet
End Sub

Sub Watermark()
Dim wkSheet As Integer
Set myDocument = ActiveWorkbook

For wkSheet = 1 To ActiveWorkbook.Sheets.Count
Set myWatermark = myDocument.Worksheets(wkSheet).Shapes.AddTextEffec t(
_
PresetTextEffect:=msoTextEffect2, _
Text:="Draft", _
FontName:="Arial Black", _
FontSize:=36, _
FontBold:=False, _
FontItalic:=False, _
Left:=318.75, _
Top:=159.75)
With myWatermark
Name = "Dum"
.IncrementRotation -43.46
.Fill.Visible = msoFalse
.Fill.Transparency = 0.5
.Fill.Solid
.Fill.ForeColor.SchemeColor = 22
.Line.Weight = 0.75
.Line.DashStyle = msoLineSolid
.Line.Style = msoLineSingle
.Line.Transparency = 0#
.Line.Visible = msoTrue
.Line.ForeColor.SchemeColor = 22
.Line.BackColor.RGB = RGB(255, 255, 255)
.ZOrder msoBringToFront
End With
Next wkSheet
End Sub



  #3   Report Post  
Posted to microsoft.public.excel.programming
Bon Bon is offline
external usenet poster
 
Posts: 23
Default How to remove watermark

Sub WaterMarkerGone()
Dim intSheet As Int eger
Dim wkBook As Workbook
Dim wkSheet As Worksheet
Dim intShape As Integer
Dim totalCount As Integer
Dim totalShapes As Integer
totalCount = ActiveWorkbook.Worksheets.Count
For intSheet = 1 To totalCount
Set wkSheet = ActiveWorkbook.Worksheets(intSheet)
totalShapes = wkSheet.Shapes.Count
If TypeName(Selection) = "Rectangle" Then 'New added
Do While totalShapes 0
wkSheet.Shapes(totalShapes).Delete
totalShapes = totalShapes - 1
Loop
End If 'New added
Next intSheet
End Sub

I tried to put IF TypeName(Selection) = "Rectangle" Then 'Remove
watermark. But, the watermark doesn't be removed.

The suggested procedure doesn't remove watermarks in all worksheets as
well. Any other way I can try?

Please give me some suggestions.

Thanks
Bon
Norman Jones 寫道:

Hi Bon,

Try:

'=============
Sub WaterMarkerGone()
Application.ScreenUpdating = False
Dim page As Integer
For page = 1 To Application. _
ExecuteExcel4Macro("GET.DOCUMENT(50)")
On Error Resume Next
ActiveSheet.Shapes("Dum").Select
Selection.Cut
Next page
Application.CutCopyMode = False
End Sub
'<<=============

---
Regards,
Norman


"Bon" wrote in message
oups.com...
Hello all

I created a watermark in each sheet. When I run my WatermarkGone macro,
all watermarks and pictures/graphics are removed. But, I want to remove
the watermark only. How can I do that? Please give me some advices.

Here are my Watermark and WatermarkGone code:

c

Sub Watermark()
Dim wkSheet As Integer
Set myDocument = ActiveWorkbook

For wkSheet = 1 To ActiveWorkbook.Sheets.Count
Set myWatermark = myDocument.Worksheets(wkSheet).Shapes.AddTextEffec t(
_
PresetTextEffect:=msoTextEffect2, _
Text:="Draft", _
FontName:="Arial Black", _
FontSize:=36, _
FontBold:=False, _
FontItalic:=False, _
Left:=318.75, _
Top:=159.75)
With myWatermark
Name = "Dum"
.IncrementRotation -43.46
.Fill.Visible = msoFalse
.Fill.Transparency = 0.5
.Fill.Solid
.Fill.ForeColor.SchemeColor = 22
.Line.Weight = 0.75
.Line.DashStyle = msoLineSolid
.Line.Style = msoLineSingle
.Line.Transparency = 0#
.Line.Visible = msoTrue
.Line.ForeColor.SchemeColor = 22
.Line.BackColor.RGB = RGB(255, 255, 255)
.ZOrder msoBringToFront
End With
Next wkSheet
End Sub


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default How to remove watermark

Hi Bon,

Try:

Sub WaterMarkerGone()
Dim SH As Worksheet
Dim shp As Shape

Application.ScreenUpdating = False

For Each SH In ActiveWorkbook.Worksheets
For Each shp In SH.Shapes
If shp.Name = "Dum" Then
shp.Delete
End If
Next shp
Next SH

Application.ScreenUpdating = True

End Sub
'<<=============


---
Regards,
Norman


"Bon" wrote in message
oups.com...
Sub WaterMarkerGone()
Dim intSheet As Int eger
Dim wkBook As Workbook
Dim wkSheet As Worksheet
Dim intShape As Integer
Dim totalCount As Integer
Dim totalShapes As Integer
totalCount = ActiveWorkbook.Worksheets.Count
For intSheet = 1 To totalCount
Set wkSheet = ActiveWorkbook.Worksheets(intSheet)
totalShapes = wkSheet.Shapes.Count
If TypeName(Selection) = "Rectangle" Then 'New added
Do While totalShapes 0
wkSheet.Shapes(totalShapes).Delete
totalShapes = totalShapes - 1
Loop
End If 'New added
Next intSheet
End Sub

I tried to put IF TypeName(Selection) = "Rectangle" Then 'Remove
watermark. But, the watermark doesn't be removed.

The suggested procedure doesn't remove watermarks in all worksheets as
well. Any other way I can try?

Please give me some suggestions.

Thanks
Bon
Norman Jones ??:

Hi Bon,

Try:

'=============
Sub WaterMarkerGone()
Application.ScreenUpdating = False
Dim page As Integer
For page = 1 To Application. _
ExecuteExcel4Macro("GET.DOCUMENT(50)")
On Error Resume Next
ActiveSheet.Shapes("Dum").Select
Selection.Cut
Next page
Application.CutCopyMode = False
End Sub
'<<=============

---
Regards,
Norman


"Bon" wrote in message
oups.com...
Hello all

I created a watermark in each sheet. When I run my WatermarkGone macro,
all watermarks and pictures/graphics are removed. But, I want to remove
the watermark only. How can I do that? Please give me some advices.

Here are my Watermark and WatermarkGone code:

c

Sub Watermark()
Dim wkSheet As Integer
Set myDocument = ActiveWorkbook

For wkSheet = 1 To ActiveWorkbook.Sheets.Count
Set myWatermark = myDocument.Worksheets(wkSheet).Shapes.AddTextEffec t(
_
PresetTextEffect:=msoTextEffect2, _
Text:="Draft", _
FontName:="Arial Black", _
FontSize:=36, _
FontBold:=False, _
FontItalic:=False, _
Left:=318.75, _
Top:=159.75)
With myWatermark
Name = "Dum"
.IncrementRotation -43.46
.Fill.Visible = msoFalse
.Fill.Transparency = 0.5
.Fill.Solid
.Fill.ForeColor.SchemeColor = 22
.Line.Weight = 0.75
.Line.DashStyle = msoLineSolid
.Line.Style = msoLineSingle
.Line.Transparency = 0#
.Line.Visible = msoTrue
.Line.ForeColor.SchemeColor = 22
.Line.BackColor.RGB = RGB(255, 255, 255)
.ZOrder msoBringToFront
End With
Next wkSheet
End Sub



  #5   Report Post  
Posted to microsoft.public.excel.programming
Bon Bon is offline
external usenet poster
 
Posts: 23
Default How to remove watermark

Hi Norman

The draft watermark can be removed. Thanks for you help.

Thanks
Bon



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I remove a watermark in Excel Gordon[_2_] Excel Worksheet Functions 2 September 20th 08 07:02 PM
How do I remove Watermark from View. Melody Excel Discussion (Misc queries) 2 February 21st 08 07:49 PM
How do I add/remove a text watermark in an Excel spreadsheet? learner Excel Discussion (Misc queries) 1 July 12th 05 08:09 PM
remove the watermark in Excel (2000) "Page1" Rich Excel Discussion (Misc queries) 2 May 14th 05 04:46 PM
trying to remove a watermark on the excel sheet Susan Excel Worksheet Functions 2 November 18th 04 09:52 PM


All times are GMT +1. The time now is 04:12 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright 2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"