Getting this Error message....any one know y???

Mar 11 2009 8:25 AM

i using this codes.....some times i get this error message...any one know why????

"the process cannot access the file because it is being used by another proces"

this is the message but its not using any other process...

here is my code

foreach (ListViewItem item in listView2.SelectedItems)
                        {
                            listView2.FocusedItem = listView2.Items[item.Index];
                            DSOFile.OleDocumentPropertiesClass file = new DSOFile.OleDocumentPropertiesClass();
                            file.Open(listView2.FocusedItem.Text, false, DSOFile.dsoFileOpenOptions.dsoOptionOpenReadOnlyIfNoWriteAccess);


                            file.SummaryProperties.Title = tbxTitle.Text;
                            file.SummaryProperties.Subject = tbxSubject.Text;
                            file.SummaryProperties.Keywords = tbxKeywords.Text;
                            file.SummaryProperties.Author = tbxAuthor.Text;
                            file.SummaryProperties.Comments = tbxComments.Text;
                            file.Close(true);
                            MessageBox.Show("Changes Added into Selected File");
                        }


Answers (4)