Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 293
  • Last Modified:

Launching PPT from VB

Hi All,
ICan someone help me with a Vb code which can launch a Power Point Macro from a
stand alone VB application. I have been stuck in this problem since long.
 
Thanks in advance,
Lonely
0
LonelyVB
Asked:
LonelyVB
  • 2
1 Solution
 
bruintjeCommented:
you could try something like


Sub h()
Dim PPApp As Object
Dim myp As Object
Set PPApp = CreateObject("PowerPoint.Application")
PPApp.Visible = True
Set myp = PPApp.Presentations.Open("c:\temp\myprez.ppt")
PPApp.Run ("myprez.ppt!Module1.t")
End Sub

where
myprez is your presentation name
Module1 is your module name in the presentation
t is the name of the public sub you're calling

hope this helps a bit
0
 
LonelyVBAuthor Commented:
Hi Bruintje,
Thanks for the reply to my query.

I tried the code and it works wonderfully. I was able to launch the macro from my VB application. Thanks a million for the same.

Lonely
0
 
bruintjeCommented:
cool, glad you got it solved :)
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now