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