Microsoft KB Archive/278545

= Error message in PowerPoint: DocumentWindow (unknown member): Invalid enumeration value =

Article ID: 278545

Article Last Modified on 6/12/2007

-

APPLIES TO


 * Microsoft Office PowerPoint 2007
 * Microsoft PowerPoint 2002 Standard Edition

-



This article was previously published under Q278545





SYMPTOMS
When you try to programmatically view the thumbnails of a Microsoft PowerPoint presentation, you may receive a run-time error message that is similar to the following:

DocumentWindow (unknown member) : Invalid enumeration value.

You receive this error message when either of the following lines of code are used in a Microsoft Visual Basic for Applications procedure: ActiveWindow.ViewType = ppViewThumbnails

-or-

ActiveWindow.ViewType = ppViewMasterThumbnails

Note You only recieve this error message in PowerPoint 2007 if you use the second code example listed.



CAUSE
This behavior occurs because PowerPoint is not designed to let you view the thumbnails in the entire active window. Thumbnails can be viewed only in the Thumbnail pane to the left of the slide pane. The lines of code described in the &quot;Symptoms&quot; section attempt to display the thumbnails in the entire active window.



WORKAROUND
Microsoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. Microsoft support professionals can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific needs. If you have limited programming experience, you may want to contact a Microsoft Certified Partner or the Microsoft fee-based consulting line at (800) 936-5200. For more information about Microsoft Certified Partners, please visit the following Microsoft Web site:

https://partner.microsoft.com/global/30000104

For more information about the support options that are available and about how to contact Microsoft, visit the following Microsoft Web site:

http://support.microsoft.com/default.aspx?scid=fh;EN-US;CNTACTMS

Note The following macro examples work only in PowerPoint. Visual Basic for Applications macros are not supported by the Microsoft PowerPoint Viewer. For more information, click the following article number to view the article in the Microsoft Knowledge Base:

230746 PPT: Viewer: Presentation Macros Don't Run Within the Viewer

To work around this issue, you need to test to find out which pane is active, and then activate the Thumbnail pane. To do so, run the following macro: Function CheckView As Boolean ' ' This function assumes that you are already in Normal view. ' If you are unsure which view you are in, then first check ' to see if you are in ppViewNormal for the ActiveWindow ' ViewType. Switch if necessary, then run this code. '  With ActiveWindow ' ' Test to see if you are already in Thumbnail view. '     If .ActivePane.ViewType <> ppViewThumbnails Then ' ' If you are in a different view, then activate first pane of ' Normal view. ' Then set the ViewType to ppViewThumbnails. ' Set the function to return True, indicating success in switching ' views. '        .Panes(1).Activate .ViewType = ppViewThumbnails CheckView = True Else ' ' If the view is already in Thumbnail view, return False, indicating ' no change to the view was necessary. '        CheckView = False End If  End With End Function



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the &quot;Applies to&quot; section.

Additional query words: PPT2007 PPT2002 PPT kbnoOfficeAlertID

Keywords: kbbug kberrmsg kbfix KB278545

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.