Solved

Launching PPT from VB

Posted on 2003-10-24
3
281 Views
Last Modified: 2010-05-01
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
Comment
Question by:LonelyVB
  • 2
3 Comments
 
LVL 44

Accepted Solution

by:
bruintje earned 50 total points
Comment Utility
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
 

Author Comment

by:LonelyVB
Comment Utility
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
 
LVL 44

Expert Comment

by:bruintje
Comment Utility
cool, glad you got it solved :)
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now