winim icon indicating copy to clipboard operation
winim copied to clipboard

com - onenote minimal example

Open mantielero opened this issue 3 years ago • 0 comments

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]

mantielero avatar Mar 22 '21 08:03 mantielero