I would like to get the coding for opening a powerpoint file from visual basic program.
S.Jacob
Printable View
I would like to get the coding for opening a powerpoint file from visual basic program.
S.Jacob
use the ShellExecute API and pass the name of the PPT file as argument:
option Explicit
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 Const SW_SHOWNORMAL = 1
private Sub Command2_Click()
Call ShellExecute(me.hwnd, "open", "myfile.ppt", vbNullString, vbNullString, SW_SHOWNORMAL)
End Sub
...this works, if PPT files are associated with powerpoint
The article here http://support.microsoft.com/support...NG=ENG&SA=MSDN demonstrates how to automate PP (2000) using VB.
Chris Eastwood
CodeGuru - the website for developers
http://codeguru.developer.com/vb