Unterschied zw. Master und Normalansicht feststell

Hi ihr Experten,

ich habe ein Problem in PP-XP. Ich brauche die Information in welcher Ansicht sich die Präsentation befindet. Leider bekomme ich bei den Ansichten Normal und Folien-Master mit meinem Code immer das gleiche Ergebnis… NORMAL.

Ich prüfe das mit diesem Code:

Function AnsichtPrüfen() As Boolean

If ActiveWindow.ViewType = ppViewSlideMaster Then
AnsichtPrüfen = False
MsgBox „Master“
Else
If ActiveWindow.ViewType = ppViewNormal Then
AnsichtPrüfen = True
MsgBox „Normal“
Else
MsgBox „Eine andere Ansicht“
End If
End If

End Function

Wenn ich mir (mit der unteren Codezeile) von den Ansichten Normal und Folienmaster die Werte in einer MessageBox ausgeben lasse bekomme ich in beiden Ansichten den Wert 9 ausgegeben…

MsgBox ActiveWindow.ViewType

Hat jemand eine Ahnung, wie ich diese Prüfung sonst noch machen könnte?

Vielen Dank im voraus --> JueKai

Für alle die es interessieren sollte… bin auf der Knowledge Base von Microsoft fündig geworden!

Sub DisplayViewType()
Dim typCurrentViewType As PpViewType
Dim strCurrentViewType As String

’ First determine if the current view is the Normal View.

If Application.ActiveWindow.View.Type = ppViewNormal Then

’ If it is, then the second item in the Panes collection
’ will be the actual view we wish to return a value on.

typCurrentViewType = ActiveWindow.Panes.Item(2).ViewType
Else

’ If it is not, then return the ViewType for the active
’ window.

typCurrentViewType = Application.ActiveWindow.View.Type
End If

’ Based on the view type, assign the corresponding
’ description to the string variable.

Select Case typCurrentViewType
Case ppViewSlide
strCurrentViewType = „Slide“
Case ppViewSlideMaster
strCurrentViewType = „Slide Master“
Case ppViewNotesPage
strCurrentViewType = „Notes Page“
Case ppViewHandoutMaster
strCurrentViewType = „Handout Master“
Case ppViewNotesMaster
strCurrentViewType = „Notes Master“
Case ppViewOutline
strCurrentViewType = „Outline“
Case ppViewSlideSorter
strCurrentViewType = „Slide Sorter“
Case ppViewTitleMaster
strCurrentViewType = „Title Master“
Case ppViewNormal
strCurrentViewType = „Normal“
Case ppViewPrintPreview
strCurrentViewType = „Print Preview“
Case ppViewThumbnails
strCurrentViewType = „Thumbnails“
Case ppViewMasterThumbnails
strCurrentViewType = „Thumbnails Master“
End Select

’ Display the ViewType value.

MsgBox strCurrentViewType & " View"
End Sub