To comment on the following update, log in, then open the issue: http://www.openoffice.org/issues/show_bug.cgi?id=97823 Issue #|97823 Summary|StoreToUrl error 1001 automation bridge when saving do |cument Component|framework Version|OOO300m9 Platform|All URL| OS/Version|Windows XP Status|UNCONFIRMED Status whiteboard| Keywords| Resolution| Issue type|DEFECT Priority|P3 Subcomponent|code Assigned to|tm Reported by|forwarn
------- Additional comments from [email protected] Wed Jan 7 10:38:32 +0000 2009 ------- Code which worked in all previous OO 2.3 and earlier versions now fails in OO 3.0.0 Build 9358. The code fails in both VB and Foxpro. Can create a document through code and save OK. However if an existing document is opened (either a Writer document or Calc) and it is modified and then saved - you get the error - OLE I Dsipatch exception code 1001 from [automation bridge] com.sun.star.task.ErrorCodeIOException: .. Here is the code in VB - Try oDesk = oSM.CreateInstance("com.sun.star.frame.Desktop") Catch ex As Exception Throw New Exception("Could not create OpenOffice service" & vbCrLf & ex.ToString()) End Try 'Set the parameters for opening the file Dim OpenParams(1) OpenParams(0) = OOoPropertyValue(oSM, "Hidden", True) OpenParams(1) = OOoPropertyValue(oSM, "OverWrite", True) 'Document name Dim cURL cURL = "file://///Fw1/homedrives/dswift/My Documents/Work Folder/Word Processing/Filing/Test Letter.odt" Try oDoc = oDesk.loadcomponentFromURL(cURL, "_blank", 0, OpenParams) Catch ex As Exception Throw New Exception("Could not open " & cURL & vbCrLf & ex.ToString()) End Try 'Write back the Title, Keyword and Comments oDoc.DocumentInfo.Title = "The Title" oDoc.DocumentInfo.Keywords = "The keyword" oDoc.DocumentInfo.Description = "The Description" 'Set the parameters for saving the file Dim SaveParams(1) SaveParams(0) = OOoPropertyValue(oSM, "Hidden", True) SaveParams(1) = OOoPropertyValue(oSM, "OverWrite", True) oDoc.storeToUrl(cURL, SaveParams) '---------------------This line fails with error code 1001 oDoc.close(True) oDoc = Nothing Public Function OOoPropertyValue(ByRef objServiceMgr As Object, ByVal cName As Object, ByVal uValue As Object) As Object Dim oPropertyValue As Object ' not sure where I found this, but it does the trick! oPropertyValue = objServiceMgr.Bridge_GetStruct ("com.sun.star.beans.PropertyValue") oPropertyValue.Name = cName oPropertyValue.Value = uValue Return oPropertyValue End Function --------------------------------------------------------------------- Please do not reply to this automatically generated notification from Issue Tracker. Please log onto the website and enter your comments. http://qa.openoffice.org/issue_handling/project_issues.html#notification --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
