slide master view

J

Jason

Good day,

I am currently writing an application involving powerpoint, using c#, but if
anybody knows how to do this in VBA, thats cool too.

So, I have the code to change to the slide master view:

application.ActiveWindow.ViewType = PP.PpViewType.ppViewSlideMaster;
(application is a PowerPoint.Application)

then I would like to navigate to a particular slide in the view, however
when I try to do this, I get the following exception:

System.Runtime.InteropServices.COMException (0x80048240): View (unknown
member)
: Invalid request. This view type does not support this action.
at Microsoft.Office.Interop.PowerPoint.View.GotoSlide(Int32 Index)
at TestProject.Program.Main(String[] args) in C:\Documents and
Settings\jpelt
zer\My Documents\Visual Studio
2005\Purifile\PurifileAssistants\TestProject\Prog
ram.cs:line 33

the following is the line of code throwing the exception:

application.ActiveWindow.View.GotoSlide(2);

Is there a way to do this, I am baffled and would love to see an answer.

Thanks in advance,
Jason
 
S

Steve Rindsberg

Dumb question, maybe, but is there some reason you need to display a particular
design in the template?

If you don't get a better answer, one approach is to add a dummy slide, set its
design to the master you want to go to, THEN change to slide master view. When
you go to master view, PPT shows the master for the current slide.

Good day,

I am currently writing an application involving powerpoint, using c#, but if
anybody knows how to do this in VBA, thats cool too.

So, I have the code to change to the slide master view:

application.ActiveWindow.ViewType = PP.PpViewType.ppViewSlideMaster;
(application is a PowerPoint.Application)

then I would like to navigate to a particular slide in the view, however
when I try to do this, I get the following exception:

System.Runtime.InteropServices.COMException (0x80048240): View (unknown
member)
: Invalid request. This view type does not support this action.
at Microsoft.Office.Interop.PowerPoint.View.GotoSlide(Int32 Index)
at TestProject.Program.Main(String[] args) in C:\Documents and
Settings\jpelt
zer\My Documents\Visual Studio
2005\Purifile\PurifileAssistants\TestProject\Prog
ram.cs:line 33

the following is the line of code throwing the exception:

application.ActiveWindow.View.GotoSlide(2);

Is there a way to do this, I am baffled and would love to see an answer.

Thanks in advance,
Jason
 

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