VBA to úse external COM object (difference between Word and Access VBA?)

P

Patrik Sj?gren

Hi,
We have a COM object, which in turn use DDE to comminicate with
anothert application of ours. This COM object is used from C++,
Visual BAsic, VBScript and VBA. However, the same code that works
in MS Word fails in MS Access.

Are there any differences in VBA in MS Word and MS Access regarding
COM?
Should a COM object be done in any special way to be able to be used
from MS Access VBA?

thanks/Patrik Sjögren
 
P

Patrik Sj?gren

Additional information:

Our COM object is not a GUI object. All it contains is
around 20 methods that use BSTR to send and receive information, e.g:

virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE
PACSGetVersion(
/* [retval][out] */ BSTR *version) = 0;

The methods in the COM object in turn calls a corresponding DDE
function of our applications to exchange information. The data
returned through the DDE interface is correct, according to the logs.
However, when the VBA-code is run in MS Access, the returned
information from the DDE call, in this case "PACS_version<1.4>",
is replaced with "Error" before arriving to our COM object.
So, MS Access somehow corrupts the information received via DDE
to our COM object before it arrives. The same VBA-code works fine when
run from MS Word.
The problem seems to be that MS Access somehow interferes with DDE
communication, and in our case even replaces data.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top