Solved

Launching PPT from VB

Posted on 2003-10-24
3
287 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 44

Accepted Solution

by:
bruintje earned 50 total points
ID: 9613359
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
ID: 9614222
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
ID: 9615146
cool, glad you got it solved :)
0

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

738 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