WorkSheet.GetRange() returns a LPDISPATCH which can be assigned to a Range object. You can use the LPDISPATCH returned by GetRange() or access the underlying IDispatch pointer of an existing Range object using the LPDISPATCH() operator to create the required variant:
vtRng.vt = VT_DISPATCH;
// Assign LPDISPATCH returned by GetRange()
vtRng.pdispVal = objSheet.GetRange(COleVariant(TEXT("A1")),COleVariant(TEXT("M34")));
// Alternatively, access the IDispatch pointer of an existing Range object
// vtRng.pdispVal = objRange;
I keep pointing you to MSDN and various related pieces of documentation, but you keep coming back here asking for the same thing. Try using the tools at your disposal (Google, Bing etc) to find what you are looking for.
One of these days I'm going to think of a really clever signature.
I have asked a lot about how to read PDF files(just like JAWS, a quit good screen reader), what I want to ask is that does anybody know how JAWS make it. I mean,what kind of tech does JAWS take advantage of. I guess it used MSAA.
I'm trying to do the same thing with JAWS now, so I need your help, if anybody has done such things, please help! Appriciate it.
I made a .NET COM DLL (VS2012, C#) it registers fine with regasm, but not with regsvr32. Also when I add the .tlb into installer and extract the com stuff (Installshield 2012) there is no registry entries after I have ran the installer. DLL is 32-bit and I'm using 64-bit Windows.