1

I have both the 32 and 64 bit version of Office 2010. If I need to install VSTO 2 for 2010 Office 32 bit machines and install VSTO 4 64 bit for 2010 Office 64 bit machines

Public Function checkbitversion() As Variant
#If VBA7 Then
    checkbitversion = "64"
#Else
    checkbitversion = "32"
#End If
End Function 

but it always results as 32 bit for all machines. I need help to overcome the problem.

I refer to the following MSDN article: http://msdn.microsoft.com/en-us/library/ff700513%28v=office.11%29.aspx

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
Kumaran T
  • 617
  • 1
  • 9
  • 24

2 Answers2

0

Check the Bitness value in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\version\Outlook

Where version above is 14.0 or 15.0 depending on the Outlook version.

Dmitry Streblechenko
  • 62,942
  • 4
  • 53
  • 78
0

Try this code, untested, from the second forum post from > HERE.

Function Is64bit() As Boolean
Is64bit = Len(Environ("ProgramW6432")) > 0
End Function

He says The logic seems to be if that environment variable returns anything or not, as that parameter probably doesn't exist in the 32-bit version.

If it returns something it is 64 bit, otherwise it is 32 bit, per his description.

Elias
  • 2,602
  • 5
  • 28
  • 57