Bekijk de onderstaande video om te zien hoe je onze site als een web app op je startscherm installeert.
Opmerking: Deze functie is mogelijk niet beschikbaar in sommige browsers.
Sub Vervang()
' Vervang Macro
' Macro opgenomen op 2-7-2018 door H.C.M. ten Haaken
'Deze macro vervangt woorden, maar doet het om een of andere reden niet goed.
With ActiveDocument.Content.Find
.Execute "Zoo ", , , , , , , , , "Zo ", 1
.Execute "zoo", , , , , , , , , "zo", 1
.Execute "Zoo.", , , , , , , , , "Zo.", 1
.Execute "Zoo,", , , , , , , , , "Zo,", 1
.Execute "Zoo;", , , , , , , , , "Zo;", 1
.Execute "zoo'", , , , , , , , , "zo'", 1
.Execute "Zoo?", , , , , , , , , "Zo?", 1
.Execute "Zoo!", , , , , , , , , "Zo!", 1
.Execute "zoodra?", , , , , , , , , "zodra", 1
.Execute "zoolang", , , , , , , , , "zolang", 1
End With
End Sub
' deze macro moet het woord Zoon uitsluiten
Sub SluitUit()
With Selection.Find
.ClearFormatting
.Text = "Zoon" 'is het nodig dat de volgende op True staat?
.MatchCase = False 'False bij grote en kleine letters anders True?
.MatchWholeWord = False
.Forward = True
.Wrap = wdFindContinue
.Format = True
Do While .Execute
Select Case Selection.Next.Text
Case "Zoon", "zoon"
Case Else
If Selection.Text = "Zoo" Then
MsgBox "woord wordt Zo" 'voor hoofdletter
.Text = "Zoo"
Selection.Text = "Zo"
Else
MsgBox "woord wordt zo" ' voor kleine letter
.Text = "zoo"
Selection.Text = "zo"
End If
End Select
Selection.Collapse Direction:=wdCollapseEnd
Loop
End With
End Sub
Sub Woorden()
Vervang "Zoon", "Kindvan" [COLOR="#008000"]'Even Zoon aan de kant zetten[/COLOR]
Vervang "zoon", "kindvan" [COLOR="#008000"]'Even zoon aan de kant zetten[/COLOR]
Vervang "Zoo", "Zo"
Vervang "zoo", "zo"
Vervang "Kindvan", "Zoon" [COLOR="#008000"]'Zoon weer terug zetten[/COLOR]
Vervang "kindvan", "zoon" [COLOR="#008000"]'zoon weer terug zetten[/COLOR]
End Sub
Sub Vervang(Woord1 As String, Woord2 As String)
For Each myStoryRange In ActiveDocument.StoryRanges
With myStoryRange.Find
.Text = Woord1
.Replacement.Text = Woord2
.MatchCase = True
.Wrap = wdFindContinue
.ClearFormatting
.Replacement.ClearFormatting
.Replacement.Highlight = False
.Execute Replace:=wdReplaceAll
End With
Next myStoryRange
End Sub
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "^-"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Vervangwoord ”^-”, ””
'Sub VervangWoord(Woord1 As String, Woord2 As String)
For Each myStoryRange In ActiveDocument.StoryRanges
With myStoryRange.Find
.Text = Woord1
.Replacement.Text = Woord2
.MatchCase = True
.Wrap = wdFindContinue
.ClearFormatting
.Replacement.ClearFormatting
.Replacement.Highlight = False
.Execute Replace:=wdReplaceAll
End With
Next myStoryRange
End Sub
We gebruiken essentiële cookies om deze site te laten werken, en optionele cookies om de ervaring te verbeteren.