Live-Forum - Die aktuellen Beiträge
Anzeige
Archiv - Navigation
704to708
Aktuelles Verzeichnis
Verzeichnis Index
Übersicht Verzeichnisse
Vorheriger Thread
Rückwärts Blättern
Nächster Thread
Vorwärts blättern
Anzeige
HERBERS
Excel-Forum (Archiv)
20+ Jahre Excel-Kompetenz: Von Anwendern, für Anwender
704to708
704to708
Aktuelles Verzeichnis
Verzeichnis Index
Verzeichnis Index
Übersicht Verzeichnisse
Inhaltsverzeichnis

PDF Datei öffnen

PDF Datei öffnen
05.12.2005 07:59:59
F
Hallo,
ich möchte durch betätigen eines CommandButtons
eine PDF Datei, die auf c:\pdf liegt öffnen.
Wie mache ich das ?
Mit freundlichen Grüßen
Frank

2
Beiträge zum Forumthread
Beiträge zu diesem Forumthread

Betreff
Datum
Anwender
Anzeige
AW: PDF Datei öffnen
05.12.2005 08:48:41
LarsJungclaus
Hallo Frank
versuchs mal so:
Option Explicit
Private Declare Function GetShortPathName Lib "kernel32.dll" Alias "GetShortPathNameA" ( _
ByVal lpszLongPath As String, _
ByVal lpszShortPath As String, _
ByVal cchBuffer As Long) As Long
Private 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
Private Declare Function GetActiveWindow Lib "user32.dll" () As Long
Private Const MAX_PATH = 260&
Private Const SW_MAXIMIZE = 3&

Private Sub prcOpen_PDF()
Dim strPath As String, strShortPath As String, strFile As String
strFile = "doku.pdf"
strPath = "H:\Powerpoint Präsentation\"
strShortPath = Space(MAX_PATH)
GetShortPathName strPath & strFile, strShortPath, MAX_PATH
ShellExecute GetActiveWindow, "open", strShortPath, "", strPath, SW_MAXIMIZE
End Sub

P.S. immer mal im Forums-Archiv suchen da ist fast immer was.
Gruß Lars Jungclaus
Anzeige
AW: PDF Datei öffnen
05.12.2005 08:54:18
F
Hallo Lars Jungclaus,
also das hatte ich mir einfacher vorgestellt.
zb: open c:\TMG.pdf
Aber ich fang gerade mit VBA an.
Vielen Dank für Deine Hilfe
Gruß
Frank

Links zu Excel-Dialogen

Beliebteste Forumthreads (12 Monate)

Anzeige

Beliebteste Forumthreads (12 Monate)

Anzeige
Anzeige
Anzeige