Enrique,
PMFJI: I believe I follow what you are attempting to do, however I'm not
sure you can. (actually I suspect one can, but I'm not sure at what "pain"
cost ;-))
I suspect its a chicken & egg problem: You need Excel to start the VSTO
project, but you need a Test Project to start Excel, while the Test Project
really wants to create the VSTO object... Unfortunately the
Excel.Application you get when starting Excel is not the same as the one
internally used by the VSTO project. I understand the one internal to the
VSTO project is actually an aggregated object, the real Excel.Application
object is hidden under the veneer of VSTO's Excel Application object...
Somehow you need to get the Excel.Application object inside the VSTO
project, outside to the Test Project. Correct?
I'm not sure how one would do that. <thinking out loud>One thought I had is
to let the Test Project start your Excel VSTO project as you have been, then
have your Excel VSTO project hand back what the Test Project needs via some
"backdoor" such as remoting or something. But I don't have a "warm &
comfortable" feeling on what could be used so all parties involved remain
happy & friendly...</thinking out loud>
Have you tried asking "down the hall" in the
microsoft.public.vsnet.vstools.office newsgroup?
BTW: I would be curious if you find a way.
--
Hope this helps
Jay [MVP - Outlook]
..NET Application Architect, Enthusiast, & Evangelist
T.S. Bradley -
http://www.tsbradley.net
"Enrique" <en*****@nospam.nospam> wrote in message
news:9F**********************************@microsof t.com...
|
|
| "Luke Zhang [MSFT]" wrote:
|
| > We cannot access extended excel object with automation also. What I
means
| > is open the Excel document with automation and test its properties in a
| > Unit Test.
| >
| > Luke
| >
| >
| Luke, please answer this: Can I access VSTO 2005 extended objects from a
| Visual Studio Test Project? If not, this means that Visual Studio Testing
| Tools can not be used for fully testing VSTO 2005 projects with extended
| excel objects because there is no way tests methods can access extended
excel
| objects.
|
| Please say if this is correct or incorrect. Sorry to be so direct but I
need
| to have this point clear.
| Thanks
|