In particular, the files I'm opening are Excel ".xlsm" workbooks that sometimes result in the "This file contains links to other files. Should they be updated? [Yes] [No]" dialog being displayed. I don't need any links to be updated for my purposes and don't want the user to have to get involved, so I set "UpdateDocMode" property to "NO_UPDATE" in the file-open operation as follows:
Code: Select all
Dim SaveProperties(1) As New com.sun.star.beans.PropertyValue
FileProperties(0).Name = "MacroExecutionMode"
FileProperties(0).Value ="NEVER_EXECUTE"
FileProperties(1).Name = "UpdateDocMode"
FileProperties(1).Value = "NO_UPDATE"
SrcFile = StarDesktop.loadComponentFromURL(FilePath, "_blank",0 ,FileProperties())
I also did some additional investigation and discovered the "LinkUpdateMode" property, but none of the documentation I can find clearly describes its functionality, especially with regard to how it is different from "UpdateDocMode". (Actually, the documentation for "UpdateDocMode" is pretty vague too.)
So I have four basic questions:
1. What is the difference between the "UpdateDocMode" and "LinkUpdateMode" properties?
2. How do properties like "UpdateDocMode" and/or "LinkUpdateMode" interact with the Tools=>Options=>OpenOffice Calc=>General=>Updating setting?
3. How do properties like "UpdateDocMode" and/or "LinkUpdateMode" interact with the current state of the ThisComponent.IsExecuteLinkEnabled property?
4. Is there something more subtle or obscure going on (such as exiting OpenOffice and restarting it, or some such) that would explain why code that didn't work yesterday now works, under apparently the same conditions?
Thanks in advance for any help.