07-10-2013 10:36 AM
Hello,
We are trying to automatically update (reinitialize and rebuild) Word (.doc) Documents in MEGA using the JAVA Api and then detach them.
There are two problems:
doc.invokeMethod(“InitializeDocument”); // Works as expected (Same as Right-Click -> Reinitialize)
doc.invokeMethod(“RefreshDocument”); // Doesn’t do anything
doc.invokeMethod(“DetachDocument”, path); // Detaches the document to “path” without refreshing
How is the correct usage of “RefreshDocument” and “DetachDocument”?
09-10-2013 10:55 AM
I never used to java API but in vb I do the following for achieving the similar thing, maybe it gives some extra insight
Set oDocument = oObject.NewDocument("enter the template name")
Call oDocumnet.RefreshDocument
Call oDocument.DetachDocument("enter path to detach to")
Call oDocument.Delete("No") 'removes document again
regards
stijn