VAPIM_CONVERT

Description

Converts the currently open document to another format, without requiring the user to respond to the SaveAs dialog. To generate the SaveAs dialog box, use the VAPIMWP_FILE_SAVEAS message. The TPVAPIConvert structure includes two data members, one a target file and the other a format code, which you can set to RTF, text, or HTML.

Syntax

#include <kvvapi.h>
SendMessage( hWndVAPI, VAPIM_CONVERT, 0,
           (LPARAM) (TPVAPIConvert*) lpConvert );

Arguments

Argument

Description

hWndVAPI

The handle of the VAPI window.

lpConvert

A pointer to a TPVAPIConvert structure.

Returns

SendMessage() returns TRUE if the conversion succeeds.

Discussion

To make sure that the entire document is opened before the document is converted, open the document with the bWait member in the TPVAPIOpenDocumentInfo structure set to TRUE. Use the VAPIMWP_CANCONVERT message to determine whether the document has been completely processed and is ready to be converted.


_HP_HTML5_bannerTitle.htm