PDF-Datei per Makro/Schaltfläche öffnen
04.05.2006 14:13:39
Sophie
unter folgendem Link habe ich in Archiv Beiträge zu diesem Tehma bereits gefunden
https://www.herber.de/forum/archiv/640to644/t641748.htm#641748
Nur leider funktioniert bei mir der Code nicht´:o(
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 Const MAX_PATH = 260&
Private Const SW_MAXIMIZE = 3&
Private Sub prcOpen_PDF()
Dim strPath As String, strShortPath As String, strFile As String
strFile = "Handbuch.pdf"
strPath = "R:\QV\"
strShortPath = Space(MAX_PATH)
GetShortPathName strPath & strFile, strShortPath, MAX_PATH
ShellExecute GetActiveWindow, "open", strShortPath, "", strPath, SW_MAXIMIZE
End Sub
Ich nutze Microsoft VB 6.0
Vielleicht liegt daran.
Ich möchte per Schaltfläche oder Knopf ein Dokument im PDF öffnen lassen. Das soll auch auf den anderen Rechner funktionieren, an die ich den ganzen Ordner inkl. aller Dateien versende.
Ich wäre sehr dankbar für einen coolen Tipp!!!
Schönen sonnigen Tag,
Sophie