LabWindows/CVI

WordRpt_InsertCVITable

HRESULT WordRpt_InsertCVITable (CAObjHandle documentHandle, int panelHandle, int controlID, WREnum_TextAlignment alignment, CAObjHandle *tableHandle);

Purpose

Inserts a CVI table control into a Word Document at the current cursor position.

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.
panelHandle int The specifier for a particular panel that is currently in memory.

This handle will have been returned by the LoadPanel, NewPanel, or DuplicatePanel function.
controlID int The defined constant (located in the UIR header file) which was assigned to the control in the User Interface Editor, or the ID returned by the NewCtrl or DuplicateCtrl function.
alignment WREnum_TextAlignment The alignment of the table heading.

Note  The alignment of the table heading is with respect to the page and not the table.


Could be one of the following WREnum_TextAlignment constants:

WRConst_AlignLeft = 0
WRConst_AlignCenter = 1
WRConst_AlignRight = 2
Output
Name Type Description
tableHandle CAObjHandle A handle to the CVI table.

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