I'm looking for some help with Microsoft Word and writing Macros.
I'm trying to use VB to remove two logos from a Word document.
I have been trying use the following code with no such luck:
Sub RPSAfterDetails()
Selection.HomeKey Unit:=wdStory
For x = 1 To ActiveDocument.Content.ShapeRange.Count
ActiveDocument.Content.ShapeRange(x).Select
With Selection.Find
.ClearFormatting
.Replacement.ClearFormatting
.Text = "^g"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Do
Selection.Find.Execute
If Selection.Text = rmlogo Or s1logo Then
Selection.Delete Unit:=wdCharacter, Count:=1
Else
End If
Loop While Selection.Find.Found
Next x
End Sub
Sub RemoveLogos() ActiveDocument.Shapes("s1-logo").Select Selection.ShapeRange.Delete ActiveDocument.Shapes("logo-rightmove_bigger").Select Selection.ShapeRange.Delete End SubAny help at all would be greatly appreciated,
Thanks.


Sign In
Create Account

Back to top









