Quote:
Yes but it doesn't work. When I compile the code in x86 mode it works only in 32 bits version
Well, that's why it doesn't work.
You cannot combine 32 and 64-bit code in the same process. If you're using 64-bit Office, the .DLL you're using must also be compiled 64-bit. The same goes for 32-bit Office. If you're using 32-bit Office, the .DLL must be compiled 32-bit.
This goes for ALL applications in Windows, not just Office.