Sharepoint: Assign a welcome page to a teamsite with publishing NOT enabled
In Sharepoint you cannot assign a new welcome page via site settings unless the publishing feature is enabled. However you can do this programmatically using the following code: using (SPSite...
View ArticleMerging documents into a single document using Open XML SDK 2.0 and Word...
The code below will create a webpart that can be added to any document library, when the button ‘Merge Reports’ is clicked it will merge all the documents together in the library in to a single...
View ArticleHow to create an Excel Workbook from an SQL database using Open XML SDK 2.0
Below is the C# code to create a new Excel workbook based on a template file & populated by an SQL database. You need to add references to: DocumentFormat.OpenXml System.Data.Linq Windows.Base...
View ArticleWord Automation Services – Convert a Word 2010 Doc to PDF
The following example provides the complete C# listing for the simplest Word Automation Services application You need to add references to WindowsBase, Microsoft.Office.Word.Server &...
View ArticleModifying an Open XML Document in a SharePoint Document Library
C# Console Application code to query a Sharepoint Library, Open a document, Make a change & then save the document. You need references to WindowsBase.dll, Microsoft.Sharepoint &...
View ArticleSharepoint Object Model C# Error The Web Application at could not be found....
When running some C# code containing a reference to SPSite ie string siteUrl = "http://devapp01/"; using (SPSite spSite = new SPSite(siteUrl)) I was getting the following error: The Web Application at...
View ArticleHow to auto populate Word template using Open XML SDK 2.0
Here is some simple code that updates a word document template that contains 2 content controls in the template document called: MatterNumber DocType The template document is –...
View Article