查看當前ooo文檔類型的宏
Sub detectType()
Dim mediaDescr(3) as new com.sun.star.beans.PropertyValue
docurl = thisComponent.getURL()
mediaDescr(0).Name = "URL"
mediaDescr(0).Value = docurl
typemgr = createUnoService("com.sun.star.document.TypeDetection")
'make deep type detection (not just based on filename extension)
msgbox typemgr.queryTypeByDescriptor(mediaDescr(), True)
End Sub
Dim mediaDescr(3) as new com.sun.star.beans.PropertyValue
docurl = thisComponent.getURL()
mediaDescr(0).Name = "URL"
mediaDescr(0).Value = docurl
typemgr = createUnoService("com.sun.star.document.TypeDetection")
'make deep type detection (not just based on filename extension)
msgbox typemgr.queryTypeByDescriptor(mediaDescr(), True)
End Sub
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章
window.open()用法詳解
lpz283929516
2020-07-08 07:40:43
B2ATHADD附件壓縮插件
yippeesk
2020-07-08 12:22:24
XML----DOM4J
李冰华
2020-07-08 09:14:07
Python學習隨記(持續更新)
wujieyhy2006
2020-07-08 06:29:39
w3shool學習1-PHP 語法
amtea
2020-07-08 04:08:56
6.6 Referring to a Type with typeof
__Howl
2020-07-08 04:15:58
JQuery 之Ajax 示例
zrz009
2020-07-08 11:14:16
DirectorySearcher 的PropertiesToLoad所有屬性
银月术
2020-07-08 09:14:45
Cs Tip17: wwwStatus 設置
pigmaster
2020-07-08 08:22:51
CS2.0 中若自動登錄無效的解決辦法
pigmaster
2020-07-08 07:42:01
Oracle 優化 ---學習
jiunizhuai
2020-07-08 05:11:03
在線顯示
word: BufferedInputStream bis = null; URL url = null; HttpURLConnection h
jiunizhuai
2020-07-08 05:11:01