Displaying various file types from Access 2007

  • Thread starter Thread starter wmdmurphy
  • Start date Start date
W

wmdmurphy

I have an application where I would like to store file paths and names in a
text field in a table, and from a form allow the user to open and display
various file types in their native applications: Word, Excel, Jpeg, PDF,
etc. The path and name would be formatted as a hyperlink in the form
control.

I've experimented with Dev Ashish's fHandlefile API and it does open each of
the file types. PDF files and Jpeg files open maximized in Windows as they
should. But Word and Excel files open and then immediately minimize to the
task bar, and the user is returned to the Access form. Here's the code I'm
using in the click event of the file name control on the form:

dim x as boolean
x = fHandleFile(Me!PathAndFileName, WIN_MAX)

Is there a way in the code to make Word and Excel stay maximized until the
user closes them?

Bill
 
Daniel,

I've tried your suggestions below in addition to fHandlefile and am getting
the same results for all of them with Word and Excel. I'm running the 2002
version for both Word and Excel. I thought perhaps there might a
configuration setting in each of them that could account for this behavior,
but I don't see this.

Do you have any other suggestions?

Bill
 
Back
Top