A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Powerpoint, Publisher and Visio » Visio
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

End of my tether !



 
 
Thread Tools Display Modes
  #1  
Old September 19th, 2004, 03:04 PM
Brent Wherry
external usenet poster
 
Posts: n/a
Default End of my tether !

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.GetActiveOb ject
("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



  #2  
Old September 20th, 2004, 12:03 PM
Follow on
external usenet poster
 
Posts: n/a
Default

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=).


"Brent Wherry" wrote:

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.GetActiveOb ject
("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




 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:47 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.