Category Archives: SharePoint

Register Code Behind InfoPath Form for Web Browsing

This post describes how to deploy a web browser compatible InfoPath form, with code-behind, through a SharePoint feature. Installing and registering an InfoPath form, along with a custom content type is pretty straight forward once you know the required steps. … Continue reading

Posted in InfoPath, SharePoint | Tagged , | Leave a comment

Sharing WebPart and User Control Properties

When creating a Visual WebPart, sometimes you want the main functionality to be contained within the user control and not the WebPart, so that, for example, you can use the WebPart on multiple pages, one where the WebPart is hosted … Continue reading

Posted in SharePoint | Tagged , , | 2 Comments

Working with Word and OpenXML

When working with Word documents using the OpenXML SDK, it’s not obvious how to remove document protection. The following code shows you how: using (WordprocessingDocument wordDocument = WordprocessingDocument.Open("[path to Word document]", true)) { DocumentFormat.OpenXml.OpenXmlElement protectedDocElement = wordDocument.MainDocumentPart.DocumentSettingsPart.ChildElements.FirstOrDefault(el => el.XmlQualifiedName.Name.Equals("documentProtection")); if … Continue reading

Posted in Office, SharePoint | Tagged , , | Leave a comment

Web Config Updates

The SPWebConfigModification class for SharePoint provides an easy way of updating the web config for a web application. Sometimes, however, I’ve seen it used incorrectly. For example, it’s not advisable to try and write to the web config on Web … Continue reading

Posted in Configuration, SharePoint | Tagged , | Leave a comment

Enhanced Lookup Field – Part 4

This is the fourth and final part of the post describing how to create a custom lookup field for SharePoint. Other pages in this post are: Part 1 – Creating a custom lookup field type Part 2 – Add field … Continue reading

Posted in SharePoint | Tagged , | Leave a comment