DeleteAttachment

Deletes Attachment.

Public Function DeleteAttachment(

ByVal DocId As Long,

ByVal PageNo As Integer,

ByVal AttachmentName As String) As Long

 

Parameters

In/out

Name

Data type

Description

In

DocumentId

Long

Document Index.

In

PageNo

Long

Page Number.

In

AttachmentName

String

Attachment Name.

 

Description

This function is called from OmniDocs Desktop. It is used to delete the attachments set on a document.

 

Return value

Name

Description

NG_SUCCESS

In case of success

-1

Invalid cabinet name

-3

Cabinet not connected

-2

Invalid Operation in Read-Only Cabinet.

 

Example

Dim DocumentId                             As  long

Dim PageNo                                   As  long

Dim AttachmentName                     As  String

Dim lRetVal                                    As  long

AttachmentName =”Attach.Doc”

DocumentId = 10

PageNo = 0

lRetVal = gPanDb.DeleteAttachment(DocumentId , PageNo, AttachmentName)

If lRetVal <> NG_SUCCESS Then

        MsgBox gPandDb.ErrDescription, vbInformation

        Screen.MousePointer = vbNormal

        Exit Sub

Else

        MsgBox “Success”       

  End If