OfficeTips Home || VBA Section || General Section || Download Section || Privacy Policy

Copy slides with source formatting

Share |
 

This has been a issue that has vexed most PowerPoint developers. The only way around it was to pretty write all the code to mainting the source formatting manually.  Part of the problem was that the option to maintain source formatting was only available thru a smart tag which could not be automated. This has changed in PPT 2010. You can access the control that's now available to paste with source formatting.

Version supported: PowerPoint 2010

 

Sub PasteWithSourceFormatting()
'Copy the slide from 1st presentation
Presentations(1).Slides(1).Copy
'To paste the slide, first activate the target presentation
Presentations(2).Windows(1).Activate
'Execute the command to paste with source formatting
CommandBars.ExecuteMso ("PasteSourceFormatting")
End Sub




Copyright 1999-2018 (c) Shyam Pillai. All rights reserved.