Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / May 2008

Tip: Looking for answers? Try searching our database.

Displaying various file types from Access 2007

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
wmdmurphy - 11 May 2008 17:39 GMT
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 Pineault - 11 May 2008 23:26 GMT
Is there a reason you don't just use

Application.FollowHyperlink Method?

Or another good solution if you really need to control the window state is
found at http://www.pacificdb.com.au/MVP/Code/ExeFile.htm
Signature

Hope this helps,

Daniel Pineault
http://www.cardaconsultants.com/
For Access Tips and Examples: http://www.devhut.com/index.php
Please rate this post using the vote buttons if it was helpful.

> 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
[quoted text clipped - 15 lines]
>
> Bill
wmdmurphy - 12 May 2008 17:46 GMT
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

> Is there a reason you don't just use
>
[quoted text clipped - 28 lines]
>>
>> Bill
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.