LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Report Generation Toolkit: Why are Word Text Colors Limited to only 16 Colors?

I am using Report Generation Toolkit in LabVIEW 2015 to write text and add tables to a word document.  

When I try to set text or cell backgrounds to a certain color, my color choice is changed to one of only 16 basic colors.  

Following the RGT VIs down, the color is changed in Word_LVtoWD_Color.vi.  The new basic color is then set into the Font property node: ColorIndex.  It seems that ColorIndex only takes 16 values.  

But there is another Font property node: TextColor: RGB, where you can set an unrestricted RGB color.  

Why does Report Generation Toolkit use restricted colors with the ColorIndex node instead of the full TextColor node?  Is there a problem with using the TextColor node?

I want other developers to be able to work on this code, so I don't want to just edit the default RGT vis.  In that case, what is the easiest way to implement the fix?  

I attached a vi that demonstrates the issue.  

 

0 Kudos
Message 1 of 2
(2,089 Views)

I don't know why the RGT developers decided to use the ColorIndex instead of the color property, the only advantage is that if you change the color theme the color you used will change accordingly (not very usefull for almost everybody!).

 

If you want other developers to be able to work on this code you will have to develop your own version that can be used with the RGT, I usually use the Excel Get ActiveX References.vi to do this (your vi will have the report in, report out connectors).

 

Ben64

0 Kudos
Message 2 of 2
(2,077 Views)