Sign in to follow this  
Followers 0
ozone

How to Remove Strike-through in Clipboard Contents?

1 post in this topic

#1 ·  Posted (edited)

I have clipboard contents that contains formatted text where some of the text is formatted as strike-through. All I want to do is remove any and all text that is formatted as such. I've been pointed in the direction of Clipboard.au3 but I can't make heads or tails of the functions in there.

I don't know if it helps but here is what a corresponding VB macro looks like in Word. How would I do something equivalent in AutoIt?

Sub Macro1()
'
' Macro1 Macro
'
'
    Selection.Find.ClearFormatting
    With Selection.Find.Font
        .StrikeThrough = True
        .DoubleStrikeThrough = False
    End With
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
        .Text = "*"
        .Replacement.Text = ""
        .Forward = True
        .Wrap = wdFindContinue
        .Format = True
        .MatchCase = False
        .MatchWholeWord = False
        .MatchAllWordForms = False
        .MatchSoundsLike = False
        .MatchWildcards = True
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
End Sub

Edited by ozone

Share this post


Link to post
Share on other sites



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0