Avatar of abfinfo
 asked on

Differentiation VBA 32bit/64bit for declare statements

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
   ’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..
Microsoft OfficeVB ScriptScripting Languages

Avatar of undefined
Last Comment

8/22/2022 - Mon
Bill Prew


Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck