Take the 2-minute tour ×

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?


share|improve this question

1 Answer 1

up vote 0 down vote accepted

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;
share|improve this answer

Your Answer


