automation object type library reference

  • Thread starter Thread starter Kevan Hanson
  • Start date Start date
K

Kevan Hanson

I am having trouble guessing the data type of some of the
automation functions. I am controlling Excel from a C++
app using excel.exe to create wrapper classes for
Application, Workbooks etc.

example: in C++ the Sheets.SaveAs code reguires before,
after, count, etc as arguments. I know what they all mean
from the VBA object model help; but are they shorts, longs
etc to cast the colevariant you have to use??

Does anyone know where I can get hold of an online
reference so I can look these things up quickly???

Regards,
Kevan
 
the help file in Excel VBA shows all the arguments to be variant.
 
In VBA thats the case, however in c++ if you initialize an
application object as "oExcel" for example, then the
following code references a WorkBook (provided oBook and
oBooks have been initialized).

oBook = oBooks.get_Item(COleVariant((short)1));

whereas

oBook = oBooks.get_Item(COleVariant((double)1));



fails, (obvious: but some are not; I was in a hurry) what
I am trying to find is a reference that indicates what
data type each argument is supposed to be. I know one
exists because I have seen it before, but not needed it
until now.

thanks for the reply.

Regards,
Kevan
 

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

Back
Top