[AccessD] open pdf file

Kath Pelletti kp at sdsonline.net
Tue Aug 28 01:35:44 CDT 2007


thx Stuart
  ----- Original Message ----- 
  From: Stuart McLachlan 
  To: Access Developers discussion and problem solving 
  Sent: Tuesday, August 28, 2007 3:05 PM
  Subject: Re: [AccessD] open pdf file


  YOu need to use the ShellExecute() API call

  Declare Function ShellExecute Lib _
       "shell32.dll" Alias "ShellExecuteA" _
       (ByVal hWnd As Long, ByVal lpOperation _
       As String, ByVal lpFile As String, ByVal _
       lpParameters As String, ByVal lpDirectory _
       As String, ByVal nShowCmd As Long) As Long

  Then:

  ShellExecute 
  0,"Open","C:\MyPDF.pdf",vbNullString,CurDir$,vbNormalFocus

  On 28 Aug 2007 at 14:32, Kath Pelletti wrote:

  > Any tips on some code that will allow me to open an (existing) a pdf file ? I would like it to open in the user's default pdf reader (whether that be adobe or free acrobat reader etc?)
  > 
  > Or do I need to spefically use Create/GetObject to open Acrobat reader?

  -- 
  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