wie kann ich powerpoint datei per makro öffnen?
Danke
Sub tt()
Dim x
x = Shell("c:\Pfad Zu Powerpoint\powerpnt.exe Dateiname.pps", vbNormalFocus)
End Sub
Gruß
Renhard
Dim PPObject As Obect
Set oPPT = CreateObject("Application.PowerPoint")
oPPT.Visible = True
oPPT.Presentations.Open Filename:="praesentation.ppt"
Gruesse,
Johannes
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
Sub DateiOeffnen(Pfad As String)
ShellExecute Application.hwnd, "Open", Pfad, _
vbNullString, vbNullString, vbNormalFocus
End Sub
Ein Aufruf in einem Makro wäre dann z.B.:
DateiOeffnen "C:\test\datei.ppt"
Gruß Matthias
Option Explicit
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
Sub Open_File(strFileName As String, windowType As Integer)
ShellExecute 0, "Open", strFileName, "", "", windowType
End Sub
'3 = Maximized
Open_File "c:\DeineDatei.txt", 1
End Sub
von Ramses Rainer
http://clever-forum.de/read.php?11,128213,128217#msg-128217
Sub tt()
Dim myShell As Object
Set myShell = CreateObject("wscript.shell")
myShell.Run "c:\Test\test.ppt"
Set myShell = Nothing
End Sub
Gruß
Rudi
Die erweiterte Suchfunktion hilft dir, gezielt die besten Antworten zu finden
Suche nach den besten AntwortenEntdecke unsere meistgeklickten Beiträge in der Google Suche
Top 100 Threads jetzt ansehen