SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

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

I have created an event reciever for SharePoint Server 2010 with added and updated events.

The work is being done whenever a doc file is added to my library, it generates a copy of that file in pdf format. For this I am using dll.

When any properties of an doc file is edited the same is being reflected to pdf copy.

Till now everythings fine.

But when I edit the content of the document file already uploaded in document library, the control does not call ItemUpdated event. I want the changes made in doc file to be reflectd in pdf file.

How could I achieve this?

share|improve this question
How are you attaching your event receivers to the doc library? Declaratively as part of a feature, or through code? – Paul Lucas Dec 15 '11 at 19:18
while creating the project i just attached document library and checked the name of library in code. – Mohit Dec 16 '11 at 9:46
up vote 0 down vote accepted

My best guess is that your event handler is firing, but is failing in its attempt to copy the file content to pdf.

The reason is because when you have a document open in MS word for example, word will take out a lock on that file to prevent anyone/anything editing the contents at the same time. When you save the file, the updated event will fire, but because the lock is still there your code may not be able to access the new content.

Hope that makes sense.

share|improve this answer
I tried running the code in debug mode and found that ItemUpdated event is not firing. – Mohit Dec 16 '11 at 9:45
Can you try with a jpg or a png file, and see if the event receiver doesn't fire? I have had this weird experience where event receivers didn't fire for PDF files. – ashwnacharya Jan 15 '12 at 17:31

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.