SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What is the correct way to approve an item in WSS 2.0 through the object model? I have some code that was recently modified to auto approve items that met certain criteria by another developer. That developer has left however, and now we are finding that ALL items are being approved, regardless of whether or not they meet that criteria.

I'm pouring through the literally thousands of lines of code looking for where this is happening.

Alternately, is there a permission group that grants approval rights? I know the users the code runs as, so I could alter those if such a thing exists. However, despite finding some mention of it in the MS docs, on our own installation I don't see the permission listed anywhere.

Thanks. Please let me know if I can provide more information - I'm not well versed in SP programming.

share|improve this question
up vote 1 down vote accepted

For future googlers:

The proper way to approve an item & add a comment via object model is

newItem.ModerationInformation.Status = SPModerationStatusType.Approved;
newItem.ModerationInformation.Comment = "Automatic Approval";
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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