Microsoft Knowledge Base Article
This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved.
Terms
of Use |
Trademarks
Article ID: 951655 - Last Review: May 9, 2008 - Revision: 1.0
The slide content type is unavailable in standard enumeration in SharePoint Server 2007
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
| kbexpertiseinter kbhowto kbinfo KB951655 |
Community Feedback System
Very often, it takes hours to solve a problem. Very often, you've looked high
and low, and have tried a lot of solutions. When you finally found it, chances
are, it was because someone else helped you. Here's your chance to give back.
Use our community feedback tool to let others know what worked for you and what
didn't.
Please also understand that the community feedback system is not warranted to be
correct, it's simply a system that we've built to let people try and help each
other. If something in a feedback response doesn't make sense to you, or you're
not comfortable making changes that the feedback talks about (like registry
edits), please consult a professional.
Thank you for using kbAlertz.com Feedback System.
-- Scott Cate
Be the first to leave feedback, to help others about this knowledge base
article.
(Optional) Name
(Optional)
Public URL Or Email
Comments
No
HTML -- Text Only Please