Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-12-2016, 10:49 AM
Tod Tod is offline Replacing backgrounds Windows 7 64bit Replacing backgrounds Office 2010 64bit
Novice
Replacing backgrounds
 
Join Date: Feb 2016
Posts: 2
Tod is on a distinguished road
Default Replacing backgrounds

I was given a large number of PowerPoints slides that are in a 3:4 ratio. I need to convert them to 16:9. so they can be embedded in a video.
Is there a way to place them on a black 16:9 background without distoring the original slide. The slides have already been batched to the correct size to fill the background by height.. now I need to automate placing them on or replacing the placing the background.
Any suggestions??

Thanks
Reply With Quote
  #2  
Old 02-13-2016, 09:17 AM
JohnWilson JohnWilson is offline Replacing backgrounds Windows 7 64bit Replacing backgrounds Office 2010 32bit
Programmer
 
Join Date: Nov 2008
Location: UK
Posts: 1,912
JohnWilson has a spectacular aura aboutJohnWilson has a spectacular aura about
Default

This code should add a black background

Code:
Sub blackBack()
Dim osld As Slide
For Each osld In ActivePresentation.Slides
osld.FollowMasterBackground = False
osld.Background.Fill.Solid
osld.Background.Fill.ForeColor.RGB = vbBlack
Next osld
End Sub
__________________
Microsoft PowerPoint MVP 2007-2023
Free Advanced PowerPoint Tips and Tutorials
Reply With Quote
  #3  
Old 02-16-2016, 08:40 AM
Tod Tod is offline Replacing backgrounds Windows 7 64bit Replacing backgrounds Office 2010 64bit
Novice
Replacing backgrounds
 
Join Date: Feb 2016
Posts: 2
Tod is on a distinguished road
Default Thanks....but

I tried your script and either I'm not doing it right or something else.

I saved the ppt to a pptm format and then opened it and went to macros and created and pasted in your script.. I then hit run, but nothing seems to happen.... what am I missing... thanks
Reply With Quote
  #4  
Old 02-16-2016, 09:57 AM
JohnWilson JohnWilson is offline Replacing backgrounds Windows 7 64bit Replacing backgrounds Office 2010 32bit
Programmer
 
Join Date: Nov 2008
Location: UK
Posts: 1,912
JohnWilson has a spectacular aura aboutJohnWilson has a spectacular aura about
Default

Hard to say what you are missing but it does work!

Copy the code
Alt f11 (opens VBeditor)
Insert > Module
Paste in the code
f5 to run it.

http://screencast.com/t/6PYMkulGvK
__________________
Microsoft PowerPoint MVP 2007-2023
Free Advanced PowerPoint Tips and Tutorials
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Replacing backgrounds Colour code mail merge header table cell backgrounds ScotsMaverick Mail Merge 25 11-04-2021 02:07 PM
Replacing backgrounds Convert a word document in an empty one with backgrounds Esgrimidor Word VBA 11 12-03-2012 03:44 PM
How to "print" backgrounds to PDF randy.pare Drawing and Graphics 0 12-09-2010 12:05 PM
Replacing backgrounds Code for Changing Cell Backgrounds leroytrolley Excel 2 12-05-2008 02:05 AM
Replacing backgrounds Question concerning Backgrounds and fading. NYCorBUST PowerPoint 2 12-29-2005 09:05 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:57 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft