|
Home | VBA Section | General Section | Downloads | Licensing | Privacy Policy |
|
Set Default View Add-in for PowerPoint 2000/XP PowerPoint 2000 always opens a new presentation in the Normal view. There is no way to revert this behavior except to switch to the desired view and then ensure that the the file is saved in this desired view so that the next time it is opened it will open in this view. The Set Default View add-in is specifically designed to tackle this annoyance. Load the add-in and it will add a Views combo box on the Standard Toolbar. Using which you can set the default view in which a presentation should be opened whenever you start a new presentation or open an existing one for editing.
Click here to download
Instructions:
Now whenever you start a new presentation or open open, it will switch to the view selected in the combo box automatically. Source Code How does it work: Trap the event when a new presentation is created or a existing presentation is opened and set the active view to the desired one. The code below, creates an event handler to trap PowerPoint events. This event handler is initialized thru the Auto_Open() routine which fires automatically when compiled into an add-in. The ChangeView routine is invoked every time the create or open event occurs for a presentation, within which the default view value set by the user is read from the registry and the presentation view is switched to that view. Every time the user changes the default view, we update the value in the registry using the SetRegValue routine Insert a Class Module (cEventClass) and paste the code given below: Option Explicit Public WithEvents PPTEvent As
Application Private Sub PPTEvent_NewPresentation(ByVal Pres As Presentation) Call ChangeView(Pres) End Sub Private Sub PPTEvent_PresentationOpen(ByVal Pres As Presentation) Call ChangeView(Pres) End Sub Sub ChangeView(Pres As Presentation) Dim ViewType As Long ViewType = Val(GetSetting("Views Addin", "Settings", "View", "0")) If ViewType = 0 Then Exit Sub If ViewType = 8 Then ' If the user has set the default view to Title master ' then check it's existence before switching to that view. If Pres.HasTitleMaster Then Pres.Windows(1).ViewType = ViewType End If Else Pres.Windows(1).ViewType = ViewType End If End Sub Insert a code module and paste the code given below: Option Explicit Sub
SetViewsCombo()
Set oCmbMenu = CommandBars.FindControl(Tag:="msoViewsAddinCombo") |
Copyright © 1999-2008 Shyam Pillai. All rights reserved.
|