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
);
Parameters:
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
p_pnIndex
[out] attachment index
Return values:
S_OK
on success or COM
error codeNV_NOT_INITIALIZED
- Initialize was not calledNV_UNKNOWN_PROFILE
- no profile loadedNV_INVALID_OPTION
- attachment file not setRemarks:
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.