End of my tether !

B

Brent Wherry

I'm pretty depressed. I've just spent three days trying to
refactor my Visio based project to totally eliminate VBA,
and I'm no further forwards.

I need to be able to call Addon functions from the
ShapeSheet (as in VBA). My development environment is VS
2003 with C#. Good - so I use an out of process EXE -
simple.

After upgrading to Visio 2003 the VS options on insert now
offer the opportunity to create a Visio Addon EXE.

Fine, I've done this and it works OK. I can see the
parameters being passed across. But none of these give the
EXE Addon access to the objects deriving from the
originating application (unless we can get hold of this
handle/reference etc). So I can't even get the custom
properties of the originating shape.

So, my problem is I can't address the Visio application.

I've searched the web under "Office" and tried to get hold
of the application from
"System.Runtime.InteropService.MArshal.GetActiveObject
("Visio.Application");

This doesn't throw any exceptions, but neither does it
return a usable object, since, for the application class
it returns, the ActiveDocument property ain't established.

If anyone lives within shipping distance in the UK, I
promise a crate of beer for help out of this hole. If you
don't, my daughter lives in Georgia and she might be able
to arrange!

Thanks

Brent Wherry
 
F

Follow on

I should add that when I get into the Add On the args contain, (validly)
/doc=1,/page=3,/shape=Sheet.13,/shapeu=Sheet.13 (note no /visio=).
 

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

Top