LabWindows/CVI

WordRpt_SetMargins

HRESULT WordRpt_SetMargins (CAObjHandle documentHandle, float top, float bottom, float left, float right);

Purpose

Sets the top, bottom, left and right margins for the pages of the document.

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.
top float Sets the distance (in inches) between the top edge of the page and the top boundary of the body text.
bottom float Sets the distance (in inches) between the bottom edge of the page and the bottom boundary of the body text.
left float Sets the distance (in inches) between the left edge of the page and the left boundary of the body text.
right float Sets the distance (in inches) between the right edge of the page and the right boundary of the body text.

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 8.5 and later