Access to visio variables

Started by onesupermanone, March 27, 2010, 12:46:13 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

onesupermanone

Hi!

I am new to visio and am trying to automate Visio through VB.net.  The way I coded was by recording macros on visio and then using those in VB.net.  The problem I have contants used in Macros I can't find them in VB.net.  I found a site with all the contants values so my code works but I had to manually define those variables.  This seems wrong to me. 

Do you know what I am missing?  The example of variables is:

Const visPageHeight As Integer = 1
Const visRowXFormOut As Integer = 1

In references I have added Microsoft Visio 11.0 Type Library com that is required by VB reference.  But not sure what I am missing.

Your help is greatly appreciated.

Thanks,

Sonia

JuneTheSecond

They may be the members of
Microsoft.Office.Interop.Visio.VisCellIndices   :) :) :)
For example,,,,,
Microsoft.Office.Interop.Visio.VisCellIndices.visPageHeight
and so on.   :) :) :)
Best Regards,

Junichi Yoda
http://june.minibird.jp/

Visio Guy

So to make things a bit simpler, use the Imports statement. I always assign the Visio namespace the abbreviation "Vis".

In VB.NET, it looks like this:

  Imports "Vis" = Microsoft.Office.Interop.Visio

In C#,

  using "Vis" = Microsoft.Office.Interop.Visio;
For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010

JuneTheSecond

Best Regards,

Junichi Yoda
http://june.minibird.jp/