I want to display the content of a word document in a text box when the
filename is highlighted on a listbox.
i used the following code to do it:
Dim app As Word.Application
app = New Word.ApplicationClass()
Dim nullobj As Object
nullobj = System.Reflection.Missing.Value
Dim strFileDisplay As Object
Dim doc As Word.Document
doc = app.Documents.Open(lstResult.SelectedItem, nullobj, True, nullobj,
nullobj, nullobj, nullobj, nullobj, nullobj, nullobj, nullobj, nullobj)
doc.ActiveWindow.Selection.WholeStory()
doc.ActiveWindow.Selection.Copy()
doc.ActiveWindow.Close()
The target is accomplished completely.
The 2nd target is when u double click the filename(.doc), the file shd be
opened in MS Word.
This is also acheived.
But the problem is when it is run on client machine, it gives the following
problem:
when u highlight a filename on the listbox;
"u get the message “file is in use by another application or user,
(C:\Documents and setting\...\normal.dot)”. Then it opens a box to save the
file and launches an instance of MS Word.
If you double click on the file you can eventually open it, but Word opens a
dialog box that says “changes have been made that affect the global template,
Normal. Do you want to save those changes?”. "
What needs to be done to fix this?
Plsssssssssss help.....
Alto