Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-24-2014, 05:08 AM
JohnWilson JohnWilson is offline CommandBars in powerpoint Windows 7 64bit CommandBars in powerpoint Office 2010 32bit
Programmer
 
Join Date: Nov 2008
Location: UK
Posts: 1,913
JohnWilson has a spectacular aura aboutJohnWilson has a spectacular aura about
Default

Easiest way to have a delay is to read the timer and loop until iot reaches a set increment.

I don't know a way to check whether Slide Number etc are already checked. I guesss you could insert a slide and see if the number was visible as a check
Sub example()
Dim wName As String
Dim hWnd
Dim lpClass As String
Dim osld As Slide
CommandBars.ExecuteMso ("HeaderFooterInsert")
delayMe 0.5
wName = "Header and Footer"
lpClass = "#32770"
hWnd = FindWindow(lpClass, wName)
If hWnd <> 0 Then
Set osld = ActivePresentation.Slides.Add(1, ppLayoutTwoColumnText)
If Not osld.HeadersFooters.SlideNumber.Visible Then
SendKeys "%N" 'tick number
SendKeys "%Y" ' Apply to all
osld.Delete
End If
End If
End Sub
Sub delayMe(sngsec As Single)
Dim sngStart As Single
sngStart = Timer
While sngsec + sngStart > Timer


DoEvents
Wend
End Sub


The only way AFAIK to "click" the buttons is to use SendKeys
__________________
Microsoft PowerPoint MVP 2007-2023
Free Advanced PowerPoint Tips and Tutorials
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
PowerPoint 2007 --> PowerPoint 2003 Webpage? josephsh PowerPoint 0 06-09-2011 11:22 PM
MailItem Inspectors cache CommandBars but Calendar do not? Hydrogen Outlook 0 03-04-2006 09:50 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:54 AM.


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