Create Variations Programmatically

There have been a few queries from people recently about whether Variations could be created programmatically. I started investigating the methods used in the Sharepoint API, but then I happened across some excellent detective work on Michiel Lankamp's Sharepoint Blog.

The method he outlines is unsupported by Microsoft, but if you have the requirement to create variations programmatically, this seems to be the only way you can achieve it at present;

http://lankamp.net/post/2007/10/Enable-variations-programmatically.aspx

He has also created a project on Codeplex that compliments his article; http://www.codeplex.com/variationsettings

Well done Michiel, you're a credit to the Sharepoint community!

 btw, you might want to create your Variations through a Feature instead of programmatically. If so, check this out; http://www.codeplex.com/variationsfeature

 

Disclaimer: The software, source code and guidance on this website is provided "AS IS"
with no warranties of any kind. The entire risk arising out of the use or
performance of the software and source code is with you.

Any views expressed in this blog are those of the individual and may not necessarily reflect the views of any organization the individual may be affiliated with.