the "Math Input Panel" (Windows 7 or later; mip.exe) puts its result as MathML into the clipboard. I want to get access to that MathML item, but it is not detected as DataFlavor. Other kind of items are detected with the following macro and I can get the data. But in case of "Math Input Panel" only the MathML item exists in the clipboard. Look at the clipboard with a clipboard Viewer, e.g. "Free Clipboard Viewer" or old WinXP clipbrd.exe.
Code: Select all
Sub ReadFromClipboard
Dim null As Object
Dim sClipName As String
Dim oClip as variant
Dim oClipContents as variant
sClipName = "com.sun.star.datatransfer.clipboard.SystemClipboard"
oClip = createUnoService(sClipName)
oClipContents = oClip.getContents()
Dim flavors as variant
flavors = oClipContents.getTransferDataFlavors()
Dim aDataFlavor as new com.sun.star.datatransfer.DataFlavor
Dim i as integer
Dim nCount as integer: nCount = UBound (flavors)+1
msgbox "Count = " & nCount
dim sMessage as string
For i = LBound (flavors) To UBound (flavors)
sMessage = "[" & i & "] "
aDataFlavor = flavors(i)
sMessage = sMessage & aDataFlavor.MimeType & CHR$(13) & aDataFlavor.HumanPresentableName
msgbox sMessage
Next
End Sub