Dim oSM As Object 'Object for accessing OpenOffice Dim oDesk As Object 'Objects from the API Dim oDoc As Object 'Objects from the API Dim oSheet As Object 'Objects from the API Dim arg() 'Ignore it for the moment ! Dim lngRow As Long Dim lngCol As Long

'Instanciate OOo : this line is mandatory with VB for OOo API Set oSM = CreateObject("com.sun.star.ServiceManager") 'Create the first and most important service Set oDesk = oSM.createInstance("com.sun.star.frame.Desktop") 'Create a new doc Set oDoc = oDesk.loadComponentFromURL("private:factory/scalc", "_blank", _ 0, arg()) 'Get the first sheet in the doc Set oSheet = oDoc.getSheets().getByIndex(0)