#1
|
|||
|
|||
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 |
#2
|
|||
|
|||
That's because you made them visible on all slides afterwards.
|
#3
|
|||
|
|||
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 |
#4
|
|||
|
|||
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 |
#5
|
|||
|
|||
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. |
#6
|
|||
|
|||
Hi John
Sorry, I was skiing for one week. THX for your answer. Greetings IKA |
Tags |
ppt, titleslide, vba |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
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 |
VBA code from Excel 2007 in Excel 2010 | csam63 | Excel Programming | 1 | 10-07-2011 10:46 AM |