How I can change the actual page displayed by Visio automation?

  • Thread starter Jose Gonzale-Conde
  • Start date
J

Jose Gonzale-Conde

I am doing a C# program integrating a Visio Control.

To load a .vsd file I'm using this sentence

axDrawingControl1.Src =3D "F:\\MobiNet\\VISIO\\Sample.vsd";

Visio control opens the file and it initially shows the last page selected when I clos=
ed Sample.vsd. Lets say it was Page-4.

As far Sample.vsd holds up to 8 pages,I wanted to know the rigth procedure to show the r=
emaining pages (1-3,5-8)

Right now I=C2=B4m trying following sentences to recall Page-2, with no succes

Visio.Page page =3D axDrawingControl1.Document.Pages.get_ItemU(2);
page.Application.Window.Activate();

Any cue about it?
 
M

Michel LAPLANE

You must give the name of the page

Try something like

visApp = (Visio.Application)axDrawingControl.Window.Application
visApp.ActiveWindow.Page = visApp.ActiveDocument.Pages.ItemU("Page-2")

"Jose Gonzale-Conde" <[email protected]> a écrit dans le message de (e-mail address removed)...
I am doing a C# program integrating a Visio Control.

To load a .vsd file I'm using this sentence

axDrawingControl1.Src = "F:\\MobiNet\\VISIO\\Sample.vsd";

Visio control opens the file and it initially shows the last page selected
when I closed Sample.vsd. Lets say it was Page-4.

As far Sample.vsd holds up to 8 pages,I wanted to know the rigth procedure
to show the remaining pages (1-3,5-8)

Right now I´m trying following sentences to recall Page-2, with no succes

Visio.Page page = axDrawingControl1.Document.Pages.get_ItemU(2);
page.Application.Window.Activate();

Any cue about it?
 

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