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