Word 2010 "Why" - Microsoft Community


hello steve

i baffled have aaron lloyd changes aaronicky lloyd, "why" how stop please.

thank time, meaning find challenge, required below script.

sub nickylloyd()
stringreplaced = stringreplaced + "string searched"
each mystoryrange in activedocument.storyranges
    mystoryrange.find
        .text = "n lloyd"
        .replacement.text = "nicky lloyd"
        .wrap = wdfindstop
        .clearformatting
        .replacement.clearformatting
        .execute replace:=wdreplaceall
    end with
next mystoryrange
end sub

try this. use wildcard search , add "<" before search string indicate "n" must beginning of word.

sub nickylloyd()
    dim mystoryrange range
    ' stringreplaced = stringreplaced + "string searched"
    each mystoryrange in activedocument.storyranges
        mystoryrange.find
            .text = "<n lloyd"
            .replacement.text = "nicky lloyd"
            .matchwildcards = true
            .wrap = wdfindstop
            .clearformatting
            .replacement.clearformatting
            .execute replace:=wdreplaceall
        end with
    next mystoryrange
end sub



Office / Word / Windows 10 / Office 2010



Comments

Popular posts from this blog

Can't Sign-in to OneDrive - Microsoft Community

Shared mailbox permissions - Microsoft Community

Outlook 2016 for Mac - Multiple Issues, Error 17884 - Microsoft Community