I created a list of documents (Word) and saved it as a template.
Then I created a new list from this template in C # code and added metadata, also in C # code.
something like that:
SPListTemplateCollection listTemplates = web.Site.GetCustomListTemplates(web); SPListTemplate template = listTemplates[Convert.ToString(templateName)]; Guid g = web.Lists.Add(listName.Trim(), string.Empty, template);
Now, when I select the option โNew documentโ in the new list, the Word document is open, and the metadata i created in the list. this works great when the office is version 2010. in the 2007 version, I get a message that the word can not save the document.
In short, I think that sharepoint 2010 cannot save a document with metadata in Office 2007 to a list based on a template and created in C # code.
source share