Help and Support

Article ID: 951655 - Last Review: May 9, 2008 - Revision: 1.0

The slide content type is unavailable in standard enumeration in SharePoint Server 2007

Expand all | Collapse all

INTRODUCTION

This article discusses the fact that the slide content type is unavailable in standard enumeration in Microsoft Office SharePoint Server 2007.

MORE INFORMATION

In SharePoint Server 2007, the slide library event handler runs only in the context of the slide library. Therefore, the slide content type is not available outside the slide library context. The usage of the slide content type in custom code is not supported.

The following code enumerates through content types that are available at a site collection level. This code does not return the slide content type.
            string strResult = string.Empty;
            TextBox tbResult = null;
            SPSite site = null;
            SPWeb web = null;

            try
            {
                site = new SPSite("http://<sitecollectionurl>");
                web = site.OpenWeb();
                SPContentTypeCollection contentTypes = web.ContentTypes;
                foreach (SPContentType contentType in contentTypes)
                {
                    strResult += "Content Type Name: " + contentType.Name + System.Environment.NewLine;
                }
                tbResult.Text = strResult;
            }
            catch (Exception _e)
            {
                MessageBox.Show("Error: " + _e.Message + System.Environment.NewLine +
                    "Stack Trace: " + _e.StackTrace);
            }
            finally
            {
                if (web != null)
                    web.Close();
                if (site != null)
                    site.Close();
            }

APPLIES TO
  • Microsoft Office SharePoint Server 2007
Keywords: 
kbexpertiseinter kbhowto kbinfo KB951655

Article Translations

 

Related Support Centers