Hi there
I have some problem when implementing Interface XStorable of 
unoidl.com.sun.star.frame class .
I developed my own Library base on SDK here are method body of SaveDocAs and 
SaveDocToFile

Public Sub SaveDocAs(ByVal FileName As String, Optional ByVal Filter As 
SpreadSheetFileFilter = SpreadSheetFileFilter.MS_Excel_97)
          Dim Store As XStorable
          Dim Prop() As PropertyValue = {New PropertyValue, New PropertyValue}
          'Dim MyUrl As String = FileName
          Dim MyUrl As String = "file:///" + FileName
          Store = CType(m_mxDocument, XStorable)
          If Filter = SpreadSheetFileFilter.DefaultOpenOffice Then
              Prop = Nothing
          Else
              Prop(0).Name = "FilterName"
              Prop(0).Value = New uno.Any(ParserFilter(Filter))
              Prop(1).Name = "Overwrite"
              Prop(1).Value = New uno.Any(True)
          End If

          Store.storeAsURL(MyUrl, Prop)
      End Sub

Public Sub SaveDocToFile(ByVal FileName As String, Optional ByVal Filter As 
SpreadSheetFileFilter = SpreadSheetFileFilter.MS_Excel_97)
           Dim Store As XStorable
           Dim Prop() As PropertyValue = {New PropertyValue, New PropertyValue}
           Dim MyUrl As String = "file:///" + FileName
           Store = CType(m_mxDocument, XStorable)
           Prop(0).Name = "FilterName"
           Prop(0).Value = New uno.Any(ParserFilter(Filter))
           Prop(1).Name = "Overwrite"
           Prop(1).Value = New uno.Any(True)
           Store.storeToURL(MyUrl, Prop)
       End Sub

when invoke this method on client application with the code fragment bellow

              ExcelAttach = ExcelRoot & "\" & "Report_" & 
ReportDate.ToShortDateString

               OO.SaveDocToFile(ExcelAttach, 
OOClass.SpreadSheetHelper.SpreadSheetFileFilter.MS_Excel_97)
where ExcelAttach is a file path 
I got an exception with error code 283

Actually the document is opened by the app from a template file then the app 
filled the sheets with content and need to save this file with above mentioned 
method.
If I could set file location and filter of Document SaveFile dialog it would be 
more easy then use these 2 methods . But I don’t know how to interact with 
SaveFile dialog of OpenOffice .
Please if any body can help me.

Thank in advance.

Regards
Khammonh

Reply via email to