LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

word reports bold text on/off in tables

I want to create a table and fill inn the header in bold and there after fill the rest of the table in non bold. CVI2013 and Word 14.0.7116.5000 (32 bit)

 

This is what I do.

WordRpt_SetTextAttribute(docHandle, WR_ATTR_FONT_SIZE, 12.0);
WordRpt_SetTextAttribute(docHandle, WR_ATTR_FONT_UNDERLINE,WRConst_FALSE); 

WordRpt_SetTextAttribute(docHandle, WR_ATTR_FONT_BOLD, WRConst_TRUE);
WordRpt_SetTextAttribute(docHandle,WR_ATTR_TEXT_ALIGN,WRConst_AlignLeft);
WordRpt_AddTable(docHandle,2,7,&tableHandle);

WordRpt_AddTable(docHandle,2,7,&tableHandle);

 

filling in table header in bold by   WordRpt_WriteToCell(tableHandle,1,1,"som text");   (column1,2,3....)

 

Then chainging to non bold by     WordRpt_SetTextAttribute(docHandle, WR_ATTR_FONT_BOLD, WRConst_FALSE);

The filling row 2. The text remain bold

I have the same problem with     WordRpt_SetTextAttribute(docHandle,WR_ATTR_TEXT_ALIGN,WRConst_AlignCenter);

0 Kudos
Message 1 of 2
(4,018 Views)

Hi fluidtronic,

 

I am not experienced in CVI, but I did some checking and I cannot see that you did any misstake. Do you have the source code of some example that I can test with? I found some examples, and you should be able to change the behaviour with "WRConst_FALSE" and "WRConst_AlignCenter" the way you did. Maybe if I can see the whole code it might be more clear.

 

Could you try to do a program without the table, but only with rows of text? Does it work for you to switch between bold and regular text then? Also, left and center justified text? If yes, the way you add the table might affect how you change text properties.


0 Kudos
Message 2 of 2
(3,985 Views)