View Single Post
 
Old 01-18-2018, 03:17 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Your code is very inefficient. Try:
Code:
Sub PDM_csillagos()
Application.ScreenUpdating = False
With ActiveDocument.Range
    .PasteAndFormat (wdFormatPlainText)
    With .Find
        .ClearFormatting
        .Replacement.ClearFormatting
        .Format = False
        .Forward = True
        .MatchCase = False
        .MatchWholeWord = False
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
        .Wrap = wdFindContinue
        .Text = """"
        .Replacement.Text = ""
        .Execute Replace:=wdReplaceAll
        .Text = "?"
        .Replacement.Text = ""
        .Execute Replace:=wdReplaceAll
        .Text = "^p"
        .Replacement.Text = "*;"
        .Execute Replace:=wdReplaceAll
        .Text = "*;*"
        .Replacement.Text = "*;"
        .Execute Replace:=wdReplaceAll
        .Text = ";*;"
        .Replacement.Text = ";"
        .Execute Replace:=wdReplaceAll
    End With
    .Copy
End With
Application.ScreenUpdating = True
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote