Anzeige
Anzeige
HERBERS
Excel-Forum (Archiv)
20+ Jahre Excel-Kompetenz: Von Anwendern, für Anwender
Inhaltsverzeichnis

Prasentation aus Excel starten

Forumthread: Prasentation aus Excel starten

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
Anzeige

1
Beitrag zum Forumthread
Beitrag zu diesem Forumthread

Betreff
Datum
Anwender
Anzeige
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 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&

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_MAXIMIZE
End Sub

Gruß
Nepumuk

Anzeige
;

Beliebteste Forumthreads (12 Monate)

Anzeige
Anzeige
Entdecke mehr
Finde genau, was du suchst

Die erweiterte Suchfunktion hilft dir, gezielt die besten Antworten zu finden

Suche nach den besten Antworten
Unsere beliebtesten Threads

Entdecke unsere meistgeklickten Beiträge in der Google Suche

Top 100 Threads jetzt ansehen
Anzeige