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

Download now Buy licenses
Adrian (Softland)
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 AddAttachment method adds an action
HRESULT AddAttachment(
  [ in, string ] LPCWSTR p_wsFilePath,
  [ in ] LONG p_nLocationType,
  [ in, string ] LPCWSTR p_wsUser,
  [ in, string ] LPCWSTR p_wsPassword,
  [ in ] BOOL p_bEnabled,
  [ out ] LONG* p_pnIndex


  [in] full path to the attachment file
  [in] location type (where the attachment file is located): 1 - local folders, 2 - server folders
  [in] User and password to connect to the file path, if necessary
  [in] User and password to connect to the file path, if necessary
  [in] if attachment is enabled
  [out] attachment index

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_OPTION - attachment file not set


This method adds a new attachment at the end of the list of attachment. After adding an attachment you can change position in the list and change its options.