Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Application Presentation Type #330

Open
kevin-vanderwende opened this issue Oct 5, 2021 · 4 comments
Open

Application Presentation Type #330

kevin-vanderwende opened this issue Oct 5, 2021 · 4 comments

Comments

@kevin-vanderwende
Copy link

Is there a way to set the Type when doing app.Presentations.Add? I have an app that loops through a list of files and uses Application.CommandBars.ExecuteMso("PasteSourceFormatting"). It has worked fine until recently one of the presentations contained SmartArt. When those slides are pasted the formatting for the SmartArt is lost.

I've tested this way. I created a new presentation using PowerPoint and manually pasted slides from multiple presentations, including the one with SmartArt and it works fine. I've created a generated file without the SmartArt presentation. Then when I paste in the SmartArt presentation the formatting is lost.

SmartArt file shows this in Windows explorer: application/vnd.openxmlformats-officedocument.presentationml.presentation
My generated file: officedocument.presentationml.presentation

I can save as ppSaveAsOpenXMLPresentation but at that point it is too late. The presentations were pasted into Type officedocument.presentationml.presentation.

I was hoping there is some sort of configuration that can be set programmatically.

@jozefizso
Copy link
Member

The Presentation.Add() method has single WithWindow parameter only: https://docs.microsoft.com/en-us/office/vba/api/powerpoint.presentations.add

If you have issue with the behavior of the PowerPoint API, you can ask on Stack Overflow with the tags vba and netoffice or you can contact Microsoft Support: https://docs.microsoft.com/en-us/office/vba/articles/feedback-support

@kevin-vanderwende
Copy link
Author

kevin-vanderwende commented Oct 11, 2021 via email

@jozefizso
Copy link
Member

@kevin-vanderwende are you able to merge the two presentation files using the PowerPoint UI?

@kevin-vanderwende
Copy link
Author

kevin-vanderwende commented Oct 12, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants