File Content Extraction 26.1
Viewing SDK Programming Guide

# VAPIM_CONVERT

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.

Copyright 2016-2025 Open Text
Version 26.1 | Last updated January 2026

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to MFI-swpdl.idoldocsfeedback@opentext.com.

We appreciate your feedback!

Product: File Content Extraction 26.1

Topic Title: VAPIM_CONVERT