I have some content types for documents. It would be neat if I could have the Version and Date Modified properties attached or replicated to the Content Type.

My goal is to be able to use the property data in words quickparts. the usual Information management policy solution won't do the trick!

Any advice?



Did create custom fields and copied the data to the fields.

string webUrl = properties.WebUrl;
    using (SPSite site = new SPSite(webUrl))
        using (SPWeb web = site.OpenWeb(properties.RelativeWebUrl))
            SPListItem oItem = properties.ListItem;
            //oItem["SharePointVersion"] = oItem["Version"];
            oItem["SharePointVersion"] = oItem.Versions[0].VersionLabel;
            web.AllowUnsafeUpdates = true;
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.