-
A solution
What am I saying??? Everything's possible with VBA - it's just that sometimes it's insanely complicated 
At first, I thought that all we had to do was create an AddIn that loops through the presentations collection and deletes unsaved ones in it's Auto_Open routine, but of course the addin loads BEFORE the blank pres is opened. 
So instead, the auto_open code will have to initiate an event handling class, so paste this into a module: [VBA]Public cPPTObject As New cEventClass
Sub Auto_Open()
Set cPPTObject.PPTEvent = Application
End Sub[/VBA] Then add a class module called cEventClass and drop this in: [VBA]Public WithEvents PPTEvent As Application
Private Sub PPTEvent_AfterNewPresentation(ByVal pres As Presentation)
pres.Saved = msoTrue
pres.Close
Set cPPTObject.PPTEvent = Nothing
End Sub[/VBA]
When the addin loads, it enables events. We use the AfterNewPresentation event to close the new pres and the set the event object to nothing (otherwise opening a new blank pres would be impossible)
At that should do it... compile, save as addin, load the addin and you should never have to look at another blank presentation again (unless you're runnng 97, in which case it won't work at all)
Or just use this one...
K :-)

Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules