查看当前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