Launching application from PowerPoint using Macros issue

G

Guest

I have a Tablet PC which I’m using to host a PowerPoint. One of the slides
has an object with action setting to use macro to launch an external program.
For macro, I’m using:

Shell “file.exeâ€, vbHide

Now this launches the “file.exe†just fine except occasionally the
application would automatically minimize and focus back to the PowerPoint. I
have run same PowerPoint on non-tablet PC and I have yet to see this
“minimization†problem. Has anybody seen this happened to them? I’m trying
to figure out if it’s the PowerPoint minimizing the application, is the OS
minimizing the application or it’s something special within Tablet PCs. To
further clarify the situation, I would only click once on the activation
object to launch the macro. So it’s not like I’m accidentally clicking on
the object to launch the macro and then second click on the slide to switch
focus. If anybody has any comments or insights, I would be much grateful.

Cheers!
 
G

Guest

Oops little correction in macro. I'm using:

Shell "cmd.exe /c "path to the file"", vbHide

So I'm not sure if this problem is happening due to cmd.exe.

Again any information would be much appreciated.

Cheers!
 
S

Steve Rindsberg

Oops little correction in macro. I'm using:

Shell "cmd.exe /c "path to the file"", vbHide

Why vbHide?

Also, the multiple quote marks are probably going to confuse everything

Shell "cmd.exe /c " & chr$(34) & "c:\some folder\some file.exe" & chr$(34), vbNormal
 
G

Guest

Hi Steve,

I'm using vbHide to hide the cmd window. If I use vbNormalFocus or other
settings, for split second user will see regular cmd window. So going back
to the main question, I don't think vbHide is causing the application to
start minimized because with same macro, other times the application starts
fine.

Regarding double quotes, i can use chr$(34) but VBA complier didn't complain
about double quoting so I think I have casted the quotes correctly. In fact
when I run in debug mode and copy the string of commands and paste it and run
it in regular cmd.exe, it works fine. So I don't think double quoting is the
issue. But thank you for the suggestion.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top