IDatabaseAddDocument Method |
Add an existing file to the document archive, returning a new document object for the file.
Namespace:
SuperOffice.COM.SuperOfficeDB
Assembly:
SuperOfficeDB.Interop (in SuperOfficeDB.Interop.dll) Version: 8.0.0.0
SyntaxSODocument AddDocument(
string i_FilePath,
bool i_RemoveOriginal,
int i_ContactId = 0,
int i_PersonId = 0,
int i_ProjectId = 0
)
Function AddDocument (
i_FilePath As String,
i_RemoveOriginal As Boolean,
Optional i_ContactId As Integer = 0,
Optional i_PersonId As Integer = 0,
Optional i_ProjectId As Integer = 0
) As SODocument
Dim instance As IDatabase
Dim i_FilePath As String
Dim i_RemoveOriginal As Boolean
Dim i_ContactId As Integer
Dim i_PersonId As Integer
Dim i_ProjectId As Integer
Dim returnValue As SODocument
returnValue = instance.AddDocument(i_FilePath,
i_RemoveOriginal, i_ContactId, i_PersonId,
i_ProjectId)
SODocument^ AddDocument(
[InAttribute] String^ i_FilePath,
[InAttribute] bool i_RemoveOriginal,
[InAttribute] int i_ContactId = 0,
[InAttribute] int i_PersonId = 0,
[InAttribute] int i_ProjectId = 0
)
Parameters
- i_FilePath
- Type: SystemString
Full path to the document you want to add to SuperOffice CRM - i_RemoveOriginal
- Type: SystemBoolean
TRUE if you want SuperOffice to delete the source document after it is added - i_ContactId (Optional)
- Type: SystemInt32
contact this document should be attached to (optional) - i_PersonId (Optional)
- Type: SystemInt32
person this document should be attached to (optional) - i_ProjectId (Optional)
- Type: SystemInt32
project this document should be attached to (optional)
Return Value
Type:
SODocumentSODocument – An SODocument object representing the stored document
ExamplesAdd document to CRM
This text may be copied to the notepad, and saved as a *.vbs file. Remember to change the login information.
Dim objSO
Dim objDoc
Set objSO = CreateObject("SuperOffice.Application")
If not (objSO is nothing) Then
objSO.AddDocument "C:\myfile.doc", "False"
else
MsgBox "Unable to connect to database"
end if
Set objSO = Nothing
See Also