Of course. Without the extension Windows has no way of knowing what
application to use to open the document.
If these are files whose names have no extensions, you will need to
launch the relevant application explicitly, e.g. with something like
Dim oWord as Object
On Error Resume Next
'Get hold of WOrd if it's running
Set oWord = GetObject(,"Word.Application")
If oWord Is Nothing Then
'not running, launch it ourselves
Set oWord = CreateObject("WOrd.Application")
If oWord Is Nothing Then
MsgBox "Couldn't launch Word"
Exit Sub
End If
End If
oWord.Visible = True
oWord.Documents.Open Me.txtXXX.Value & "."
Or if they have extensions but these are not stored in the database,
just add the right extension.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.