Returning string from office app Function to VC++ .NET

R

Robert Crago

Hi there,

I can successfully call a PowerPoint XP function from
within VC++ .NET using late binding.

I am executing the following C++ .NET code:

String* str = _try_cast said:
InvokeMember("Run", rest of arguments... ));

The VBA Function called within PowerPoint is as follows:

Function ReturnIt() As String
ReturnIt = "Whatever...!"
End Function

The function is called correctly, but I get no return
string in str. When I look at it under debug, str is
<undefined value>

Does anyone have some code that successfully returns
values to VC++ .NET from VBA functions?

Thank you...

Robert
 
Top