Code: Select all
strURL = ConvertToUrl( SPREADSHEET_PATH & "InventoryWorksheet.ots" )
objDoc = StarDesktop.loadComponentFromURL( strURL, "_blank", 0, dummy() )
Code: Select all
strURL = ConvertToUrl( SPREADSHEET_PATH & Format$( Date(), "YYYYMMDD" ) & "inventory.ods" )
objDoc.storeAsURL(strURL, dummy())
Until I close the new spreadsheet and reload it. Then the buttons/macros work fine. This is the case regardless of how I have the macro security settings set. I've even tried closing the new spreadsheet and then reopening it through code, but the macros still don't work. Not until the spreadsheet is manually opened by the user.