Home > MOSS 2007 > How to change the Author of a Document that is stored in a Document Library?

How to change the Author of a Document that is stored in a Document Library?


Apparently there is’nt a straight forward way to achieve this. Below is how you can do it though:

SPList list = web.Lists[“myList”];

list.Fields[“Author”].ReadOnlyField = false;

SPListItem item = list.Items.Add();

item[“Author”] = “value”;

item.SystemUpdate(false);

list.Fields[“Author”].ReadOnlyField = true;

Advertisements
  1. stenloves
    April 23, 2009 at 12:49 am

    Hi,
    read your post and found lots of interesting stuff. I’m currently working with a task in which I need to create customized webpart which contain “hyperlink” that link to file that is last created in the folder of doc lib. (WSS 3.0 btw)Have you done anything related to that before? Look forward to your reply thanks.

  2. Victor
    May 7, 2009 at 7:07 pm

    Hi
    I would like to be able do like the same thing, but without programming it

    thanks

  3. April 7, 2013 at 11:42 am

    Thanks for a marvelous posting! I genuinely
    enjoyed reading it, you’re a great author. I will ensure that I bookmark your blog and will eventually come back someday. I want to encourage yourself to continue your great work, have a nice day!

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: