Differentiation VBA 32bit/64bit for declare statements

abfinfo
abfinfo used Ask the Experts™
on
I've got the following code which is incompatible with Winword 2010 64bit:

Declare Function GetPrivateProfileString32 Lib "KERNEL32" Alias "GetPrivateProfileStringA" (ByVal lpApplicationName As String, lpKeyName As Any, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVal nSize As Integer, ByVal lpFileName As String) As Integer

Open in new window


I know for "normal stuff" it's possible to differentiate in the following way:

If Mid(Application.ProductCode,21,1)=0 then
   ’32 bit
Else
   ’64 bit
End If

Open in new window


Is it possible to do this for declare statements too? I my case it isn't possible to use two different versions, one for 32 bit and one for 64. What's the best solution for this problem? Please post some code..
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Bill PrewTest your restores, not your backups...
Top Expert 2016

Commented:
Retired
Top Expert 2012
Commented:

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial