OLE automation how does it work???
-
I would like to create a sort of library of method in vc++ to be used in excel. So i believe that if i create a .dll application instead of a .exe, i would be better. But i have read that i could use especially OLE Automation for that kind of application. I have read in msdn the comexcel sample, but it's not really what i want to do. In fact, i would like that the methods defined in first in vc++ could be used in excel as we could to simply when we create functions in vba. So how we could do that? Where could i find samples? thanks in advance for your answers. gerald
-
I would like to create a sort of library of method in vc++ to be used in excel. So i believe that if i create a .dll application instead of a .exe, i would be better. But i have read that i could use especially OLE Automation for that kind of application. I have read in msdn the comexcel sample, but it's not really what i want to do. In fact, i would like that the methods defined in first in vc++ could be used in excel as we could to simply when we create functions in vba. So how we could do that? Where could i find samples? thanks in advance for your answers. gerald
Hi, A very good doc is: "Automating Microsoft Office 97 and Office 2000" ( written by Lori Turner , 17 February 2000), it´s free you can search for it in MSDN in the web or the cd. You can find a lot of help in MSDN, just search for this keywords: kbAutomation kbExcel kbMFC sample But anyway you are right most of the samples are made for VBasic, but it´s easy to transform it to VC code. About docs explaining more on Word Automation: http://www.codeproject.com/com/xoffice.asp and in codeguru ( www.codeguru.com) you can find some help as well. Some more samples you can find in the Kruglinski, Shepher, Wingo book "Inside Visual C++". And one more tip... sometimes the easiest way to find how to implement something for Excel or Word is just to record a macro and see the code generated in VBA. Good Luck Braulio