Open file from disc

  • Thread starter Lodewijk Olthof
  • Start date
L

Lodewijk Olthof

On my form I have the following fields
cboReference (containg the name of a file without extension)
txtPath (containing the full path to the document)
txtFileType (containing the type of file; Word, Access, Excel, PowerPoint)

Know I want to create a button to open that specific file.
With the Select Case statement on txtFileType I can find out what type of
file I have to open. When it is a Word document, I have tot open the file
txtOpenDocument = txtPath & cboReference & ".doc".

To open Word I can use something like Set oApp =
CreateObject("Word.Application") and then oApp.Visible = True.
But how do I get the txtOpenDocument in Word?

Lodewijk
 

Ask a Question

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.

Ask a Question

Top