WordRpt_SetHeader
- Updated2023-02-21
- 5 minute(s) read
HRESULT WordRpt_SetHeader (CAObjHandle documentHandle, char *lefthandText, char *centerText, char *righthandText, WREnum_FieldType leftType, WREnum_FieldType centerType, WREnum_FieldType rightType);
Purpose
Sets up the header information for the specified report.
![]() |
Note If you used the WordRpt_AddPageNumbers function before this, take care not to write over the page number in this function. |
Parameters
| Input | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| documentHandle | CAObjHandle | A handle to the Word Document object. When it is no longer needed, this handle must be discarded using CA_DiscardObjHandle. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| lefthandText | char * | The text to be displayed on the left side of the header. If no text is to be displayed, leave this field as "". | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| centerText | char * | The text to be displayed in the center of the header. If no text is to be displayed, leave this field as "". | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| righthandText | char * | The text to be displayed on the right side of the header. If no text is to be displayed, leave this field as "". | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| leftType | WREnum_FieldType | Specifies the kind of field to be displayed on the left side of the header. The default is WRConst_FieldEmpty. Can be one of the following constants:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| centerType | WREnum_FieldType | The kind of field to be displayed in the center of the header. The default is WRConst_FieldEmpty. Can be one of the following constants:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| rightType | WREnum_FieldType | The kind of field to be displayed on the right side of the header. The default is WRConst_FieldEmpty. Can be one of the following constants:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Return Value
| Name | Type | Description |
| status | HRESULT | A value indicating whether an error occurred. Function failure is indicated by a negative error code. Error codes are defined in CVIversion\include\cviauto.h and <Program Files>\National Instruments\Shared\MSDTRedistributables\SDKHeaderFiles\8.1\winerror.h. You can use CA_GetAutomationErrorString to get the description of an error code. |
Additional Information
Library: Word Report
Include file: activex\word\WordReport.h
LabWindows/CVI compatibility: LabWindows/CVI 7.0 and later
