Sign In | Register Now About Bytes | Help | Site Map
Connecting Tech Pros Worldwide

VB6-to-Power Point

Question posted by: D&JG (Guest) on April 27th, 2007 02:35 PM
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's Avatar
Raoul Watson
Guest
n/a Posts
April 28th, 2007
11:35 AM
#2

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's Avatar
Dean Earley
Guest
n/a Posts
April 30th, 2007
08:35 AM
#3

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's Avatar
D&JG
Guest
n/a Posts
April 30th, 2007
11:15 AM
#4

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's Avatar
Dean Earley
Guest
n/a Posts
April 30th, 2007
11:35 AM
#5

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

 
Not the answer you were looking for? Post your question . . .
190,472 Experts ready to help you find a solution.
Sign up for a free account, or Login (if you're already a member).

Latest Articles: Read & Comment
  • Didn't find the answer you were looking for?
    Post Your Question
  • Top Community Contributors