Jump to content

Recommended Posts

Posted (edited)

Hi,

i found several examples and also some UDF's, but they didnt helped me really well.

Can someone give me an broad hint, how to automate the following neccessary process in a word file thorugh an AutoIT script?

  • find all places/strings which have the (font.color grey25% or grey50%) and are striken through

    and make it hidden (FontEffectsHidden Text)

  • find all places/strings which are in font.color red

    and change their font.color into black

Thanks...

:idiot:

Edited by logo78
Posted

In VBScript this would look like:

'
' Makro3 Makro
'
'
Selection.WholeStory
Selection.Find.ClearFormatting
With Selection.Find.Font
    .StrikeThrough = True
    .DoubleStrikeThrough = False
    .Color = -603946753
End With
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Font.Hidden = True
With Selection.Find
    .Text = ""
    .Replacement.Text = ""
    .Forward = True
    .Wrap = wdFindAsk
    .Format = True
    .MatchCase = False
    .MatchWholeWord = False
    .MatchWildcards = False
    .MatchSoundsLike = False
    .MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub

Could you test this with Word? If it gives you the desired result it's easy to translate it to Autoit.

My UDFs and Tutorials:

  Reveal hidden contents

 

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
×
×
  • Create New...