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

© Copyright 2016-2020 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 mail client, and then send this email to swpdl.idoldocsfeedback@microfocus.com. We appreciate your feedback! Product: Topic Title: Help Topic: Feedback:

_FT_HTML5_bannerTitle.htm