| ||||
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");
}
asela WijesooriyaPosted Mar 15, 2009, 11:23 PM
LisaPosted Mar 12, 2009, 5:01 AM
try checking if you havent open the file anywhere else and if not then put down a try catch block to catch innerexception which could be helpful to trace out the problem.
Thanks,
Lisa
asela WijesooriyaPosted Mar 11, 2009, 8:58 PM
the file i loaded from local disk mean from my hard disk.file contain an image so i cannot access Image(Loacted in Hard Disk) or file(mean DSOFile.OLE Doc....Prop..Class. file = new OleDoc......Prop.....class())
you mean i cannot use this new created ole doc file in another process am i correct???can i accss Image that i loaded in to file....???
Mirko MeierPosted Mar 11, 2009, 5:34 PM
The message means, that any other process uses the file, which you try to open. It can be a another thread in your program, or another application on your workstation.