macro to control project from powerpoint

T

theintern

I need a macro in powerpoint, called CreateShow, that will run a macro in
Project called ImportAll. Is there a way to do this?
I've read a bit in the help file, but it's not enough code to actually get me
there, or to convince me this can actually be done. Also, within the
ImportAll macro, I need it to run a macro in Access, called TriFilter2, a
shortcut
to which is on my desktop (if that helps any). Skeleton code given below

thanks
scott

Sub CreateShow()
'Run ImportAll in MSProject
ActivePresentation.Slides(1).Select
'Need to insert photos from file here (help with this too!)
With ActivePresentation.SlideShowSettings
.ShowType = ppShowTypeSpeaker
.LoopUntilStopped = msoFalse
.ShowWithNarration = msoTrue
.ShowWithAnimation = msoTrue
.RangeType = ppShowAll
.AdvanceMode = ppSlideShowUseSlideTimings
.PointerColor.RGB = RGB(Red:=255, Green:=0, Blue:=0)
.Run
End With
'SlideShowWindows(Index:=1).View.Exit

End Sub
 
J

Jack Dahlgren

I suggest that you get a book on VBA. There are a number which cover the
office suite, and Rod Gill's book which covers Project VBA. They will help
you immensely.

You can also read the articles on my site:

http://zo-d.com/blog/programming.html

There are examples of working with other applications through VBA (mostly
project and excel, but the principles are the same). I would try to
consolidate all the code into a single module and set the references so that
VBA can work with the different libraries. Calling macros in different apps
and files seems a bit kludgy.

But don't give up. I think that what you want to do is possible. The hardest
part in my opinion is the VBA in powerpoint. From what I have experienced,
powerpoint's object model is second only to that of visio in its weirdness.


-Jack Dahlgren
 
T

theintern

So this is what i found to work. I am using Access as well, which has a
macro builder in it, so just opened the Project file from Access, then coded
the macro to run as soon as that file was open, and then close the file
again. Works great.
 

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