Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-19-2016, 12:34 AM
ika ika is offline PPT 2010 VBA Code Windows 8 PPT 2010 VBA Code Office 2013
Novice
PPT 2010 VBA Code
 
Join Date: Feb 2016
Posts: 12
ika is on a distinguished road
Thumbs up PPT 2010 VBA Code


Hi

I've made with help of different posts the followng code:

Sub FooterPPT()

ActivePresentation.SlideMaster.HeadersFooters.Disp layOnTitleSlide = msoFalse

Dim s As Slide

For Each s In ActivePresentation.Slides
'Footer gets visible

s.HeadersFooters.Footer.Visible = msoTrue
'Slidenumber gets visible

s.HeadersFooters.SlideNumber.Visible = msoTrue
'Footer gets filled with text

s.HeadersFooters.Footer.Text = "HELLO WORLD"

Next s

End Sub

MY PROBLEM
Unfortunately the footer and the slidenumber is still visible on the titleslide. Any help?

THX for your answers.

Greetings IKA
Reply With Quote
  #2  
Old 02-19-2016, 11:35 AM
JohnWilson JohnWilson is offline PPT 2010 VBA Code Windows 7 64bit PPT 2010 VBA Code 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

That's because you made them visible on all slides afterwards.
__________________
Microsoft PowerPoint MVP 2007-2023
Free Advanced PowerPoint Tips and Tutorials
Reply With Quote
  #3  
Old 02-19-2016, 11:38 AM
JohnWilson JohnWilson is offline PPT 2010 VBA Code Windows 7 64bit PPT 2010 VBA Code 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

Maybe this would work..

Code:
Sub FooterPPT()
Dim s As Slide
ActivePresentation.SlideMaster.HeadersFooters.DisplayOnTitleSlide = msoFalse
For Each s In ActivePresentation.Slides
'Footer gets visible
If s.CustomLayout.Index <> 1 Then
s.HeadersFooters.Footer.Visible = msoTrue
'Slidenumber gets visible
s.HeadersFooters.SlideNumber.Visible = msoTrue
'Footer gets filled with text
s.HeadersFooters.Footer.Text = "HELLO WORLD"
End If
Next s
End Sub
__________________
Microsoft PowerPoint MVP 2007-2023
Free Advanced PowerPoint Tips and Tutorials
Reply With Quote
  #4  
Old 02-19-2016, 12:55 PM
ika ika is offline PPT 2010 VBA Code Windows 8 PPT 2010 VBA Code Office 2013
Novice
PPT 2010 VBA Code
 
Join Date: Feb 2016
Posts: 12
ika is on a distinguished road
Default THX John

Dear John

THX for your very fast answer. Yes the result is exactly what I want, but ... in the footer-box in PPT itself, there should also be the footer text "HELLO WORLD" und the two boxes should be activated - please have a look at the attchment PIX 2. In PIX 1 you can see the result of your code ... but it should be as in PIX 2. My code, which was not as good as your is, produces the result in PIX 2 ... Any idea?

THX for your efforts!
IKA
Attached Files
File Type: pdf Pix 1.pdf (20.5 KB, 8 views)
File Type: pdf Pix 2.pdf (19.1 KB, 7 views)
Reply With Quote
  #5  
Old 02-20-2016, 02:07 AM
JohnWilson JohnWilson is offline PPT 2010 VBA Code Windows 7 64bit PPT 2010 VBA Code 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

The dialog will vary with the slide selected. Are you sure you haven't selected a slide without the footers visible (e.g. slide 1)

I would add On Error Resume Next near the start of the code.

It will not normally error but there are circumstances in which it will. Specifically if someone has removed the footer placeholder on the custom layout or master.
__________________
Microsoft PowerPoint MVP 2007-2023
Free Advanced PowerPoint Tips and Tutorials
Reply With Quote
  #6  
Old 02-28-2016, 10:38 AM
ika ika is offline PPT 2010 VBA Code Windows 8 PPT 2010 VBA Code Office 2013
Novice
PPT 2010 VBA Code
 
Join Date: Feb 2016
Posts: 12
ika is on a distinguished road
Default

Hi John
Sorry, I was skiing for one week. THX for your answer.
Greetings IKA
Reply With Quote
Reply

Tags
ppt, titleslide, vba



Similar Threads
Thread Thread Starter Forum Replies Last Post
PPT 2010 VBA Code MSP 2010 Outline code color allocation (grouping) not integrated Mojo99 Project 4 08-21-2015 01:17 PM
Cannot add .swf files containing AS2 code into win7 PowerPoint 2007 or 2010 tstguru PowerPoint 0 08-18-2014 12:28 PM
Problems adding VBA code to word 2010! spookiepower Word VBA 1 02-10-2014 09:08 AM
"+" in Country code in Outlook 2010 musicaldoc Outlook 0 04-27-2013 02:19 AM
PPT 2010 VBA Code VBA code from Excel 2007 in Excel 2010 csam63 Excel Programming 1 10-07-2011 10:46 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:16 AM.


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