Sign in to follow this  
Followers 0
arts

HighlightColorIndex

6 posts in this topic

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

Share this post


Link to post
Share on other sites



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?

1 person likes this

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

The possible values of the HighlightColorIndex can be found here.

green would be 11 (I think).

1 person likes this

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

Glad to be of service :)


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

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