# VAPIMWP_INIT_GETFILENAME

Gets the file name of the current document. This is a parameter of the `VAPIM_INIT` message.

## Syntax

    #include <kvvapi.h>
    SendMessage(hWndVAPI, VAPIM_INIT, VAPIMWP_INIT_GETFILENAME,
               (LPARAM) (char*) lpstzFileName );

## Arguments

Argument | Description
--- | ---
`hWndVAPI` | The handle of the VAPI window.
`lpstzFileName` | A pointer to a Pascal string that returns the file name string.

## Returns

`SendMessage()` returns `TRUE` on success; otherwise it returns `FALSE`.

## Discussion

This message returns the file name (not the full path), so the file name can be used in the window title. This message must be sent after the document is opened, otherwise the file name does not exist yet. If the file is a container file, such as a ZIP, TAR, or PST file, this file name is the name of an extracted subfile.

_FT_HTML5_bannerTitle.htm