Apply specific theme to all sharepoint site pages programmatically

By Perry

Brief steps for applying specific theme to all sharepoint site pages programmatically.

-> Create a C# console application
-> Add Microsoft.Sharepoint.dll reference (If you don't know how to do this see Sharepoint Hive FAQ in below list of FAQs)
-> Write below code:

Using Microsoft.Sharepoint;

Public static void Main(...) {

SPSite sc + new SPSite("sitename");
foreach (SPWeb web in sc.AllWebs)
web.ApplyTheme("citrus");
}

Very easy!

Related FAQs

The location of sharepoint hive 12.
Difference between Sharepoint Site and Application pages.
Configure IE for NTML authentication.
A brief path for administering sharepoint sites.
This page provides you components required for sharepoint installation.
This page brief you about sharepoint server.
Apply specific theme to all sharepoint site pages programmatically  (1644 Views)