I have office 2016 x64 and for some reason, when I try to use an external DLL, I swear that the DLL was not found. I tried to clearly indicate the path, but did not help.

On Office 2010 x32, everything works fine.

The only difference between the code is the use of ptrsafe in x64.

What could be the problem? Is x32 not fully compatible with x64? Yes, and the error would be different, I think, if the matter was in the digit capacity.

    1 answer 1

    To use an external DLL in a 64-bit office, the DLL itself must be 64-bit. Alas, 32-bit DLL will not work. That is why the support of most ActiveX components available in a 32-bit office has disappeared in the 64-bit office.

    If there is no possibility to recompile the DLL, you can try to get around this problem by creating a 64-bit stub, 32-bit wrapper and exchange data between them through IPC. For example, here is a description , but, I am afraid, the decision will be too complicated.