Open topic with navigation

# 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.

© Copyright 2016-2019 Micro Focus or one of its affiliates | Send documentation feedback Close Send documentation feedback To open the configured email client on this computer, open an email window. Otherwise, copy the information below to a web mail client, and send this email to swpdl.idoldocsfeedback@microfocus.com. We appreciate your feedback! Product: Topic Title: Help Topic: Feedback:

_FT_HTML5_bannerTitle.htm