Connecting Tech Pros Worldwide Forums | Help | Site Map

VB6-to-Power Point

D&JG
Guest
 
Posts: n/a
#1: Apr 27 '07
Hi all
I want to click a button to run a Power Point show (.pps) and don't mind if
the VB6 program exits when this is done. Is there a simple way to do this?
I've searched many VB websites but haven't seen this one yet.



Raoul Watson
Guest
 
Posts: n/a
#2: Apr 28 '07

re: VB6-to-Power Point



"D&JG" <donandjane@optusnet.com.auwrote in message
news:46320841$0$13365$afc38c87@news.optusnet.com.a u...
Quote:
Hi all
I want to click a button to run a Power Point show (.pps) and don't mind
if the VB6 program exits when this is done. Is there a simple way to do
this? I've searched many VB websites but haven't seen this one yet.
>
Shell theApp, vbNormalFocus


Dean Earley
Guest
 
Posts: n/a
#3: Apr 30 '07

re: VB6-to-Power Point


D&JG wrote:
Quote:
Hi all
I want to click a button to run a Power Point show (.pps) and don't mind if
the VB6 program exits when this is done. Is there a simple way to do this?
I've searched many VB websites but haven't seen this one yet.
Use ShellExecute.
http://hashvb.earlsoft.co.uk/ShellExecute

..ppt files have a specific "show" verb, but .pps files default to show
with the "open" verb.

--
Dean Earley (dean.earley@icode.co.uk)
i-Catcher Development Team

iCode Systems
D&JG
Guest
 
Posts: n/a
#4: Apr 30 '07

re: VB6-to-Power Point



"Dean Earley" <dean.earley@icode.co.ukwrote in message
news:4635a8a6$0$10735$db0fefd9@news.zen.co.uk...
Quote:
D&JG wrote:
Quote:
>Hi all
>I want to click a button to run a Power Point show (.pps) and don't mind
>if the VB6 program exits when this is done. Is there a simple way to do
>this? I've searched many VB websites but haven't seen this one yet.
>
Use ShellExecute.
http://hashvb.earlsoft.co.uk/ShellExecute
>
.ppt files have a specific "show" verb, but .pps files default to show
with the "open" verb.
>
--
Dean Earley (dean.earley@icode.co.uk)
i-Catcher Development Team
>
iCode Systems
Tried

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 '(one long string)

ShellExecute 0, "open", "http://www.earlsoft.co.uk/", "", "", 1

Click run..
Program stops at the 0 after ShellExecute with the error "Invalid outside
procedure".

What am I missing?

Don


Dean Earley
Guest
 
Posts: n/a
#5: Apr 30 '07

re: VB6-to-Power Point


D&JG wrote:
Quote:
"Dean Earley" <dean.earley@icode.co.ukwrote in message
news:4635a8a6$0$10735$db0fefd9@news.zen.co.uk...
Quote:
>D&JG wrote:
Quote:
>>Hi all
>>I want to click a button to run a Power Point show (.pps) and don't mind
>>if the VB6 program exits when this is done. Is there a simple way to do
>>this? I've searched many VB websites but haven't seen this one yet.
>Use ShellExecute.
>http://hashvb.earlsoft.co.uk/ShellExecute
>>
>.ppt files have a specific "show" verb, but .pps files default to show
>with the "open" verb.
>
Tried
>
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 '(one long string)
>
ShellExecute 0, "open", "http://www.earlsoft.co.uk/", "", "", 1
>
Click run..
Program stops at the 0 after ShellExecute with the error "Invalid outside
procedure".
You haven't actually put the code in any event.

If you want the exe to do nothing bar run this show, use Sub Main() in
module.

--
Dean Earley (dean.earley@icode.co.uk)
i-Catcher Development Team

iCode Systems
Closed Thread