AddDocument-Method opens the document after completion

Hello,

when I import a document into the WindowsClient via the COM API
(using the SoApplication. Database. AddDocument method), the Windows client opens
the document in the respective application (Word, Excel, etc.).
This behavior seems to be new to SuperOffice 8.0, but at least it didn't appear in SuperOffice 7.1. After updating an existing solution to SuperOffice 8.0, we have a problem with this behavior, as up to 80 documents can be imported in a batch run.
It is not wanted to open all these documents!
Is there any way to prevent the documents from being opened after importing?

RE: AddDocument-Method opens the document after completion

We are in 8.2 now.
Not too sure anymore of what is in 8.0..
The chances are though, that 8.0 uses the netserver document plugin. Quite a few issues resulted from this port.

However, we have tried to make some of this more flexible.
Application has some new methods for DocumentDialog and the Database has:

Function AddDocumentForAssociate(ByVal i_FilePath As String, ByVal i_RemoveOriginal As Boolean, ByVal i_OpenCreatedDocument As Boolean, ByVal i_AssociateId As Long, ByVal i_ContactId As Long, ByVal i_PersonId As Long, ByVal i_ProjectId As Long) As IDocument

Add an existing file to the document archive on behalf of some associate, returning a new document object for the file.

Can you see if AddDocumentForAssociate is available in your system?

This works for me in 8.2:

set app = wscript.createobject("superoffice.application")
Set doc = app.Database.AddDocumentForAssociate( "d:/adddocument test 1.txt", VbFalse, VbFalse, 106, app.CurrentContact.Identity )

 

/conrad

Af: Conrad Weyns 8. dec 2017

RE: AddDocument-Method opens the document after completion

Hi Conrad,

no AddDocumentForAssociate is not available for me under 8.0.

Any other ideas?

Af: Andreas Bender 8. dec 2017

RE: AddDocument-Method opens the document after completion

Hi Andreas,
I looked into the 8.0 release code..
I could not find a work-around.
In 8.0 we adopted the Netserver document plugin and it took us quite some time to fix all the issues.
Any reason why you can't upgrade to 8.1?
Conrad

 



 

Af: Conrad Weyns 9. dec 2017