Limited time promo

SetAttachment2

English

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

Download now Buy licenses
Mar 22, 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 SetAttachment2 method adds an action
HRESULT SetAttachment2(
[ in ] LONG p_nIndex,
[ in, string ] BSTR p_wsFilePath,
[ in ] LONG p_nLocationType,
[ in, string ] BSTR p_wsUser,
[ in, string ] BSTR p_wsPassword,
[ in ] BOOL p_bEnabled
);

Parameters:

p_nIndex
[in] attachment index
p_wsFilePath
[in] full path to the attachment file
p_nLocationType
[in] location type (where the attachment file is located): 1 - local folders, 2 - server folders
p_wsUser
[in] User and password to connect to the file path, if necessary
p_wsPassword
[in] User and password to connect to the file path, if necessary
p_bEnabled
[in] 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

Remarks:

This method sets options for an existing attachment at position given by p_nIndex.