Using VB6 my application allows the user to browse to a Word document and click on a .doc file. The path is saved and displayed as a label on a form which, if clicked, will open Word XP and display the document.
There are however a couple of problems with this:-
1) It allways says the doc is "locked for editing" (but is not open otherwise) - will only open in "read only" mode, and
2) When I close the document the file with $~xx.doc remains.
The code that I am using to open the document is:-
Any clues on how to resolve these problems would be greatly appreciated.
Doug.
There are however a couple of problems with this:-
1) It allways says the doc is "locked for editing" (but is not open otherwise) - will only open in "read only" mode, and
2) When I close the document the file with $~xx.doc remains.
The code that I am using to open the document is:-
Code:
If Index = 99 Then 'index of label with path as caption
Dim objWord As Object
Set objWord = CreateObject("Word.Application")
objWord.Documents.Open (Trim(lbl(Index).Caption))
Set objWord = Nothing
End If
Any clues on how to resolve these problems would be greatly appreciated.
Doug.