1

Are the Primary Interop Assemblies (PIA) for Office 2007 compatible with both 32 bit and 64 bit versions of Windows?

Are they compiled with a target of any processor?

Also, is there a way I can verify this, say by using a tool like Reflector?

Kara
  • 6,115
  • 16
  • 50
  • 57
ghostJago
  • 3,381
  • 5
  • 36
  • 51

1 Answers1

1

Office 2007 is a 32 bit application so you can only use interop from another 32-bit application.

This applies to both 32 and 64-bit operating systems.

Mark your application as x86 in Visual Studio (not "Any CPU").

adrianm
  • 14,468
  • 5
  • 55
  • 102
  • This works until you get into an environment where the user has multiple versions of Office installed. For example, they install Office 2010 x64 and use MS Project 2007 (32-bit). We were getting exceptions in this scenario and the only way around it was through late binding. – billb Jun 13 '13 at 13:27