P
Praded
I have the Powrpoint Template file and trying to apply it to the
presentation using automation. That template has multiple masters. I do
the following:
[C#]
PowerPoint.Application powerPointApp = null;
PowerPoint.Presentation powerPointPresent = null;
PowerPoint.Slide powerPointSlide = null;
powerPointApp = new PowerPoint.ApplicationClass();
powerPointApp.Visible = MsoTriState.msoTrue;
powerPointApp.ShowStartupDialog = MsoTriState.msoTrue;
powerPointPresent = powerPointApp.Presentations.Add(
MsoTriState.msoTrue );
powerPointPresent.ApplyTemplate( docTemplatePath );
[/C#]
After this code I have only one Design object (first master from
template) in the powerPointPresent.Designs collection.
I've tried to the same action manully in the application:
1. Create new Presentation
2. In the slide design I apply a design template and go the message box
with text: "The design template has multiple masters. PowerPoint has
applied the first master in the template. Do you want to copy the other
masters into your presentation for later use? Yes/No".
If I choose Yes I get all my masters I need. I guess when I do this in
C# code,
Office automation ignores this message and uses default answer "No". So
I get only one slide master.
Is there a way to add allthe slide masters from template by C#? Please
help.
Best regards,
Praded
presentation using automation. That template has multiple masters. I do
the following:
[C#]
PowerPoint.Application powerPointApp = null;
PowerPoint.Presentation powerPointPresent = null;
PowerPoint.Slide powerPointSlide = null;
powerPointApp = new PowerPoint.ApplicationClass();
powerPointApp.Visible = MsoTriState.msoTrue;
powerPointApp.ShowStartupDialog = MsoTriState.msoTrue;
powerPointPresent = powerPointApp.Presentations.Add(
MsoTriState.msoTrue );
powerPointPresent.ApplyTemplate( docTemplatePath );
[/C#]
After this code I have only one Design object (first master from
template) in the powerPointPresent.Designs collection.
I've tried to the same action manully in the application:
1. Create new Presentation
2. In the slide design I apply a design template and go the message box
with text: "The design template has multiple masters. PowerPoint has
applied the first master in the template. Do you want to copy the other
masters into your presentation for later use? Yes/No".
If I choose Yes I get all my masters I need. I guess when I do this in
C# code,
Office automation ignores this message and uses default answer "No". So
I get only one slide master.
Is there a way to add allthe slide masters from template by C#? Please
help.
Best regards,
Praded