简体   繁体   中英

sharepoint 2010 create list from template

I created a list of documents (Word) and saved it as template.
Then I created a new list from this template in code c#, and add meta data, also in code c#.

something like this:

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 choose "New Document" option in the new list, word document is open, with the meta data i created in the list. this works fine when office is 2010 version. in 2007 version i get message that word cant save the document.

in short, i think sharepoint 2010 can not save a documnent with metadata in office 2007 into list that based on a template and created in c# code.

I know that you can't use SharePoint 2010 Managed Metadata with Office 2007 out of the box. You can read detail information from;

Managed meatadata columns in Office 2007

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM