I have a macro that worked for years until the most recent Windows update, after which the type detection failed. Apparently, in the past it worked because the filename passed to the macro included the file extension
.ods. (I just verified that that is still happening.) However, after the most recent Windows update, the type detection based on that extension started failing, and the macro would no longer do its job. Here are the first few lines of my macro. How can I modify it to open it with Calc without having to detect the file type?
option Explicit Sub Log(sTemp as string, sSource as string, sDest as string) dim loadArgs(1) as new com.sun.star.beans.PropertyValue dim oTempDoc as object dim oSourceDoc as object dim oCopyRange as object dim oPasteRange as object dim oContents(60000,11) as object dim oDiagram as object loadArgs(0).name = "Hidden" loadArgs(0).value = True loadArgs(1).name = "ReadOnly" loadArgs(1).value = False oTempDoc = starDesktop.loadComponentFromURL(convertToURL(sTemp), "_blank", 0, loadArgs())
I’m guessing it has something to do with adding something to my loadArgs(), but I have no idea what to add.