Hi, How do I get my code to apply to all open documents except the active document.
This is where I have managed to get up to.
Thanks Nikka
(MS WORD)
For Each oDocument In Application.Documents
If oDocument.FullName <> ActiveDocument.FullName Then
Selection.Find.ClearFormatting
Selection.Find.Style = oDocument.Styles("Body Text (10pt Indented)"
Selection.Find.ParagraphFormat.Borders.Shadow = False
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Style = oDocument.Styles( _
"Body Text (10pt)"
Selection.Find.Replacement.ParagraphFormat.Borders.Shadow = False
With Selection.Find
.Text = ""
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End If
Next oDocument
This is where I have managed to get up to.
Thanks Nikka
(MS WORD)
For Each oDocument In Application.Documents
If oDocument.FullName <> ActiveDocument.FullName Then
Selection.Find.ClearFormatting
Selection.Find.Style = oDocument.Styles("Body Text (10pt Indented)"
Selection.Find.ParagraphFormat.Borders.Shadow = False
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Style = oDocument.Styles( _
"Body Text (10pt)"
Selection.Find.Replacement.ParagraphFormat.Borders.Shadow = False
With Selection.Find
.Text = ""
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End If
Next oDocument