# VAPIM_POSITION

Positions the document in the viewing window.

## Syntax

    #include <kvvapi.h>
    SendMessage(hWndVAPI, VAPIM_POSITION, 0L,
               (LPARAM) (TPVAPIPosition*) lpPosition );

## Arguments

Argument | Description
--- | ---
`hWndVAPI` | The handle of the VAPI window.
`lpPosition` | A pointer to a TPVAPIPosition structure that defines the position.

## Returns

`SendMessage()` returns `TRUE` on success; or `FALSE` on error (for example, invalid position).

## Discussion

- You can use this message at any time to position the document within the viewing window. If successful, `lpPosition->first` and `lpPosition->last` is set on return.

- If `lpPosition->position` is set to `-1`, this message fills in only the first and last values, without changing the current view position.

- If the specified position is not processed when this message is called, Viewing takes exclusive control until the position is encountered. In other words, this message does not return until the desired position is set.

- For spreadsheets, if the page containing the specified position has not been indexed at the time this message is called, this message returns `FALSE` immediately, and does not wait until the page containing the specified position is indexed.

© 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