Env:64-bit Win10 + 64-bit VS 2015
I am trying to develop an onenote add-in.
When I add a reference to MSO.dll, an alert pops-up saying
"A reference to 'C:\Program Files (x86)\Common Files\Microsoft Shared\OFFICE15\MSO.DLL' could not be added. Please make sure that the file is accessible, and that it is a valid assembly or COM component"
I've tried A reference to the dll could not be added
1. using TlbImp.exe and get following error:
TlbImp : warning TI0000 : Primary interop assembly 'Office, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71E9BCE111E9429C' is already registered for type library 'C:\Program Files (x86)\Common Files\Microsoft Shared\OFFICE15\MSO.DLL'. TlbImp : error TI0000 : System.IO.IOException - Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
- using dependency walker and found that quite a lot of dll files like these can not be found:
API-MS-WIN-CORE-ATOMS-L1-1-0.DLL
EXT-MS-MF-PAL-L2-1-0.DLL
- In excel using VBE, MSO.dll can be referenced.
Quite confused about this error, please share how to fix this problem.
Thanks for any hints/replies