[AccessD] Urgent help please - Can't openhtml pageinFrontpagefromAccess form

Kath Pelletti KP at sdsonline.net
Wed Sep 15 18:11:15 CDT 2004


Thanks Stuart - good to hear from you. I try to avoid the Shell but it looks like the way to go, doesn't it? Thanks for the reminder. I guess the downside is having to hardcode the location of that frontpg.exe file - ......

I might store the 'default' location of the frontpg.exe in a table, but prompt the user with a browse dialog to find it if it's in a different location. Not perfect, but OK??

Kath

  ----- Original Message ----- 
  From: Stuart McLachlan 
  To: Access Developers discussion and problemsolving 
  Sent: Wednesday, September 15, 2004 5:05 PM
  Subject: Re: [AccessD] Urgent help please - Can't openhtml pageinFrontpagefromAccess form


  On 15 Sep 2004 at 15:03, Kath Pelletti wrote:

  > It is essential that it happen from the database because I am storing a
  > history of documents (just path/s and filename/s) they create and they
  > have complex selection criteria for nominating which clients eventually
  > *see* the doc on the website. Given that it is so easy to create / and
  > link to a doc in Word or Excel from an Access form I thought it would be
  > pretty straightforward to do something like this in Frontpage. I'm still
  > sure that it is.....just not there yet. 
  > 

  Since Frontpage is not the default application for .htm pages, the simplest 
  way is to use SHELL(). Something like

  Function OpenWithFrontPage(HTMLFile As String) As Long
  Dim strCmd As String
  Dim strFrontPagePath As String
  strFrontPagePath = "C:\Program files\Frontpage\Frontpage.exe"

  strCmd = Chr$(34) & strFrontPagePath & Chr$(34) & " " & Chr$(34) & HTMLFile & Chr$(34)
  Shell strCmd, vbNormalFocus

  End Function
  -- 
  Stuart


  -- 
  _______________________________________________
  AccessD mailing list
  AccessD at databaseadvisors.com
  http://databaseadvisors.com/mailman/listinfo/accessd
  Website: http://www.databaseadvisors.com


More information about the AccessD mailing list