Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

include executable file 2

Status
Not open for further replies.

sept2006

Technical User
Sep 6, 2006
42
CA
Hello,

I would like to insert an executable file (.exe)in a powerpoint presentation. this is a demonstration of a concept.
Is this insertion possible?
thanks.
 
hi Gerry,

WINWORD.EXE and pai1.exe do not open at all. (checked with alt+tab)
checked them on 2 seperate buttons.

thanks.
 
Ok, do me a favour. Put the following into the sub for the button. Remember, you MUST be running the slide show. It does not fire in design mode.
Code:
Sub CommandButton1_Click()
Dim RetVal
RetVal = Shell("C:\windows\system32\calc.exe", 1)
MsgBox RetVal
End Sub

Also, remember that the actual name of the button must be CommandButton1. If you have renamed the button it won't work.

Also, CHECK and make sure that calc.exe (the calculator) is in fact in your Windows\System32 folder.

Tell me what happens.

Gerry
My paintings and sculpture
 
IT WORKED!

a message window opened with a number on it. 3748 for the first try then other numbers.

what does the 1 mean? (calc.exe", 1)

thanks
 
1=vbNormalFocus for the Shell() function. In the vba editor, click Help and then search for Shell for details.
 
Which is what I suggested back a few posts.

Did you look up Shell in Help??? Hmmmmm?

The point is...Shell does work. So if you are not getting anything - which is what you are suggesting - then you are doing something wrong. You have stated using Shell and Winword.exe does not work. Well...it does work. I am trying to narrow down what it is you are putting in that is making it "not work".

So...OK. The basic thing...you can see that Shell works. So WHAT is different about your code line with pAi1.exe?

Gerry
My paintings and sculpture
 
hi again,

I put PAi1.exe in the same folder as calc.exe (system32)but it does not execute!

thanks
 
yes it does and it is executed with the hyperlink method mentionned above.

thanks
 
Then sorry, I am stuck. I just made a PowerPoint slide with:

1. a commandbutton that executes - using Shell - calc.exe

2. a hyperlink to execute calc.exe

BOTH work. Both methods execute.

So if your hyperlink DOES execute pAi1.exe, and Shell does NOT, then you are not using Shell properly.

Gerry
My paintings and sculpture
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top