Help and Support

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

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

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

Back to the top

Keywords: 
kbexpertiseinter kbhowto kbinfo KB951655

Article Translations

 

Related Support Centers

Other Support Options

  • Need More Help?
    Contact a Support professional by Email, Online or Phone.
  • Customer Service
    For non-technical assistance with product purchases, subscriptions, online services, events, training courses, corporate sales, piracy issues, and more.
  • Newsgroups
    Pose a question to other users. Discussion groups and Forums about specific Microsoft products, technologies, and services.