|
-
January 18th, 2000, 08:06 AM
#1
Opening Powerpoit file through VB
I would like to get the coding for opening a powerpoint file from visual basic program.
S.Jacob
-
January 18th, 2000, 08:09 AM
#2
Re: Opening Powerpoit file through VB
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
-
January 18th, 2000, 09:20 AM
#3
Re: Opening Powerpoit file through VB
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|