cancel
Showing results for 
Search instead for 
Did you mean: 

Connect excel 2010 64 bits with SAP

Former Member

Hi!

I have a macro in Excel that connects to SAP.

With Office 32 bits and Windows 7 64bits works perfectly.

With Office 2010 64bits it returns the error '429' An ActiveX component cannot create the object.

I've tried to register libsvr32.dll and copy it to system32 directory but nothing works.

The error appears at line

  Set R3 = CreateObject("SAP.Functions")

I think there's some incompatibility between office 64 bits and SAP but I'm no really sure.

Could I use another method to connect SAP instead of libsvrc32.dll?

Help will be appreciated!

Thanks!

Accepted Solutions (1)

Accepted Solutions (1)

stefan_schnell
Active Contributor

Hello Eduardo,

welcome to the SAP GUI Scripting forum.

In the first case you work with Office 32-bit in a 64-bit Windows environment and it works.

In the second case you work with Office 64-bit in a 64-bit Windows environment and it works not.

The library with the ID SAP.Functions is the wdtfuncs.ocx resp. wdtfuncU.ocx for the unicode version. It is a 32-bit library and it doesn't work in a with Office-VBA 64-bit - Look here:

"Existing 32-bit ActiveX controls, both third-party and Microsoft-supplied, are not compatible with the 64-bit version of Office 2010."

I am afraid there is no way to use 32-bit ActiveX libraries with 64-bit Office in VBA - maybe another member knows it.

Good luck.

Cheers

Stefan


Former Member
0 Kudos

Thank you Stefan.

In the link you've posted it says:

"there are three possible solutions:

  • If you have the source code, you can generate a 64-bit version yourself,"

I've checked SAP Note 413708 - RFC library that is current at this time


I've downloaded the .sar file for x64 OS and in this file I see a lot of files .h and .lib.


¿Could this be the source code?

¿Is there any mode to regenerate this ocx in 64-bit?


Thanks!

stefan_schnell
Active Contributor
0 Kudos

Hello Eduardo,


this note provides information about the classic RFC library. You need this library, because the OCX libraries use it to communicate with the SAP backend. The header files contains only definitions for your programs. This is neither the source code of the classic library nor the source code of the OCX library. I am afraid there is no way for us to generate this libraries as 64-bit Version - maybe another member knows it.


I don't know if it is possible to call 32-bit libraries from a 64-bit application - anyone else?


Cheers

Stefan

Former Member
0 Kudos

Thanks Stefan.

I'm not used to fight this kind of problems and I'm very confused.

Cheers

Eduardo

stefan_schnell
Active Contributor

Hello Eduardo,

here is a solution for your problem: Using a 32bit COM object in a 64bit environment (Web page no longer exists - 2019/07/02)

The author Emmanuel Carabott describes what to do to use 32bit COM libraries in 64bit OS environments - Cool

Here an excerpt:

"To do this, it involves a small number of simple registry hacks:

  • Locate your COM object GUID under the HKey_Classes_Root\Wow6432Node\CLSID\[GUID]
  • Once located add a new REG_SZ (string) Value. Name should be AppID and data should be the same COM object GUID you have just searched for
  • Add a new key under HKey_Classes_Root\Wow6432Node\AppID\
    The new key should be called the same as the com object GUID
  • Under the new key you just added, add a new REG_SZ (string) Value, and call it DllSurrogate. Leave the value empty
  • Create a new Key under HKey_Local_Machine\Software\Classes\AppID\
    Again the new key should be called the same as the COM object’s GUID. No values are necessary to be added under this key.

That’s it, your COM Object should now be accessible from a 64bit environment and can be used like a regular COM Object."

Many thanks to Emmanuel Carabott for this tip.

Cheers

Stefan

Sandra_Rossi
Active Contributor

Answers (3)

Answers (3)

stefan_schnell
Active Contributor
0 Kudos

Hello Maria,

it is possible to disable the installation of the ActiveX controls at SAP GUI for Windows installation. If no entries in the regedit available I would assume that the libraries are not installed.

Best regards
Stefan

0 Kudos

what about if you dont find

wdtfuncs.ocx

in your regedit? what do you do in this case?

Former Member
0 Kudos

Thanks Stefan.

I'll try as soon as I can.

Regards.

Eduardo.

stefan_schnell
Active Contributor
0 Kudos

Hello Eduardo,

I tried it and it worked perfectly.

Cheers

Stefan

Former Member
0 Kudos

This sounds great!!

This week I'm in another customer and I'm not able to try it.

I have two doubts about this proceeding:

1- Which file is COM object? wdtfuncs.ocx?

2- Is AppID a variable or a text? I mean, should name be "AppID" or the ID of the application?


Thanks!

stefan_schnell
Active Contributor
0 Kudos

Hello Eduardo,

to your questions:

  1. Yes, the ProgID SAP.Functions is for the library file wdtfuncs.ocx.
  2. You must add the GUID as string, the name of the string is AppID and the content is the CLSID.

Cheers

Stefan


Sriram2009
Active Contributor
0 Kudos

Hi Eduardo

Kindly refer the SAP Note for SAPGUI with MS office 64 bit support

1442028 - SAP GUI for Windows / Desktop Office Integration: Support for Office 64bit editions


Regards

Ram

Former Member
0 Kudos

Hi S Sriram.

I found this note but I understood that there are compatibility in SapGUI 7,3 patch 7, not outside.

Regards.

Eduardo.

Sriram2009
Active Contributor
0 Kudos

Hi

As this time yes, you have to wait for some more time to support all MS office 64 bit versions

Regards

Sriram

Sriram2009
Active Contributor
0 Kudos

Hi

SAPGUI 7.30 patch level 7 has been released. Kindly check the Service market place (http://service.sap.com/swdc) as mention below screen shot reference

Regards

Sriram

Former Member
0 Kudos

Hello, I just want to know how to locate the GUID for the library file wdtfuncs.ocx because there maybe thousand of keys below CLSID

stefan_schnell
Active Contributor
0 Kudos

Hello Thanh,

open the program regedit and search (Ctrl+F) for wdtfuncs.ocx and you will find this:


The GUID on top of this entry is the GUID of the type library (TypeLib).

If you are searching for the next entry (F3), you will find this:

The GUID on top of the entry is the class ID (CLSID).

Cheers

Stefan