winim
winim copied to clipboard
com - onenote minimal example
What would it be a winim/com
minimal example for the OneNote case?
It looks like in python;
import win32com.client
onObj = win32com.client.gencache.EnsureDispatch('OneNote.Application.12')
result = onObj.GetHierarchy("",win32com.client.constants.hsNotebooks)
print(result)
But in nim:
import winim/com
comScript:
var obj = CreateObject("OneNote.Application.15")
var tmp = obj.GetHierarchy("", 1) # This gives me an error also
COM_FullRelease()
gives me the following error message:
Error: unhandled exception: unsupported method: GetHierarchy [COMError]