Jump to content

HighlightColorIndex


Go to solution Solved by arts,

Recommended Posts

Posted

Hi!

I've tried this to act on the words highlighted in yellow in a Word doc but I got an error. What's wrong with the second part of the condition? Is color not yet implemented? Thanks.

If $oRange.HighlightColorIndex <> 0 And $oRange.HighlightColorIndex.Color = 0xFFFF00 Then
...
EndIf
Posted

Welcome to AutoIt and the forum!

HighlightColorIndex is a property of the range object. So there is no Color property of the HighlightColorIndex property.

What do you try to achieve?

My UDFs and Tutorials:

  Reveal hidden contents

 

  • Solution
Posted (edited)

  On 10/7/2014 at 12:42 PM, water said:

Welcome to AutoIt and the forum!

HighlightColorIndex is a property of the range object. So there is no Color property of the HighlightColorIndex property.

What do you try to achieve?

Hi, thanks.

What I want is to identify the color(s) used to highlight the text. If a Word file text is highlighted  in red and green, I want to be able to delete the text highlighted in green and keep the text highlighted in red, for example, and not all the text that is highlighted in both colors.

 

Edited by arts
Posted

The possible values of the HighlightColorIndex can be found here.

green would be 11 (I think).

My UDFs and Tutorials:

  Reveal hidden contents

 

Posted (edited)
  On 10/7/2014 at 3:24 PM, water said:

The possible values of the HighlightColorIndex can be found here.

green would be 11 (I think).

 

I was going to tell you that the value I was looking for is the HighlightColorIndex itself after finding the same Microsoft developer page you kindly quote now. Thank you very much, Water.

Edited by arts
Posted

Glad to be of service :)

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...