troubleshooting Question

Differentiation VBA 32bit/64bit for declare statements

Avatar of abfinfo
abfinfo asked on
Microsoft OfficeScripting LanguagesVB Script
2 Comments1 Solution323 ViewsLast Modified:
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

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

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..
Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros