LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Word Report Header CVI 6.0

I would like to insert a document header which contains centered text only, and uses 5 lines. I can only insert the first line correctly, any additional lines do not appear centered.
0 Kudos
Message 1 of 2
(3,072 Views)
To center additional header lines using WordRpt_SetHeader() from WordReport.fp, insert a tab at the start of each line after the first.
For example, modify the wordrpt.prj sample that ships with CVI to the following:

char rptHeader[400];
...
sprintf(rptHeader, "Line 1\n\tLine 2\n\t"
"Line 3\n\tLine 4\n\t"
"Line 5");
WordRpt_SetHeader (docHandle, "", rptHeader, "", WRConst_FieldDate,
WRConst_FieldEmpty, WRConst_FieldTime);
0 Kudos
Message 2 of 2
(3,059 Views)