Prasentation aus Excel starten 20.11.2005 10:23:48 Sigrid Guten Morgen, ich habe da mal eine Frage an die Expertenrunde: Kann man über ein Makro aus Excel heraus eine Powerpoint-Präsentation starten, so dass sie gleich anläuft? Gruß Sigrid
AW: Prasentation aus Excel starten 20.11.2005 10:44:03 Nepumuk Hallo Sigrid, klar kann man. Frau übrigens auch. Und wenn du auch noch wissen willst wie, dann versuch es mal so: ' **********************************************************************' Modul: Modul7 Typ: Allgemeines Modul' **********************************************************************Option ExplicitPrivate Declare Function GetShortPathName Lib "kernel32.dll" Alias "GetShortPathNameA" ( _ ByVal lpszLongPath As String, _ ByVal lpszShortPath As String, _ ByVal cchBuffer As Long) As LongPrivate 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 LongPrivate Declare Function GetActiveWindow Lib "user32.dll" () As LongPrivate Const MAX_PATH = 260&Private Const SW_MAXIMIZE = 3&Public Sub prcPlay_PPS() Dim strPath As String, strShortPath As String, strFile As String strFile = "GottesIrrtum.pps" 'Dateiname anpassen strPath = "D:\Eigene Dateien\Eigene Präsentationen\" 'Pfad anpassen strShortPath = Space(MAX_PATH) GetShortPathName strPath & strFile, strShortPath, MAX_PATH strShortPath = Left$(strShortPath, InStr(1, strShortPath, vbNullChar) - 1) ShellExecute GetActiveWindow, "open", strShortPath, "", strPath, SW_MAXIMIZEEnd Sub Gruß Nepumuk Anzeige