This help topic applies only to novaPDF. If you don't have it yet, you must download it first.

Download now Buy licenses
Apr 08, 2022
novaPDF 11.x
We strive to keep our help as accurate as possible. If you notice any inconsistencies or outdated info please let us know.
The GetAttachment2 method returns the attachment for the given index
HRESULT GetAttachment2(
    [in] LONG p_nIndex,
    [out, string] BSTR* p_wsFilePath,
    [out] LONG* p_nLocationType,
    [out, string] BSTR* p_wsUser,
    [out, string] BSTR* p_wsPassword,
    [out] BOOL* p_bEnabled


    [in] custom attachment index

    [out] full path to the attachment file

    [out] location type (where the attachment file is located): 1 - local folders, 2 - server folders

    [out] User and password to connect to the file path, if set

    [out] User and password to connect to the file path, if set

    [out] if attachment is enabled

Return values:

S_OK on success or COM error code
NV_NOT_INITIALIZED - Initialize was not called
NV_UNKNOWN_PROFILE - no profile loaded
NV_INVALID_ATTACHMENT - invalid attachment index


This method returns information about the attachment at position given by p_nIndex