Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

When I close Word "$~ease help.doc" remains !!

Status
Not open for further replies.

Doug4Now

Programmer
Apr 22, 2002
34
AU
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:-

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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top