New to Office Add-In's Need help please

T

Tony Archer

I am working on a project (in .NET) which adds a button to power point
(which I've done) The button opens a form (which it does) and the form does
some business process streamlining for us (which it does)

However, I am now trying to figure out how to manipulate Power Point
directly. ie, make it go to full screen mode, set some notes on the slides
and otherwise manipulate it and it's documents. I'm having a devil of a
time finding ANY documentation on how to do this, what the object structure
is for this, etc.

Any reference help would be greatly appreciated as would any recommendations
as to reference books that are worth the money.

PS - This project is in VB.NET but I can read C# as well.

Thanks for your time and effort in your replies,

--Tony
 
M

Mark S.

Step one would be to create a "New Project" from the Visual Studio file menu. Then drill down to find Other Projects|Extensibility Projects and select Shared Add-in

Step through the wizard (check Powerpoint, uncheck all other office apps). The wizard will create the basic outline for an add-in. All you have to do is fill in the code blocks

More information on Office COM Add-Ins using .Net can be found here

http://support.microsoft.com/default.aspx?scid=kb;en-us;30289

The IDTExensibility2 interface routine called OnConnection() is your interface to Powerpoint. It passes you the Powerpoint Application Object by which you can reference the Powerpoint Object Model and control Powerpoint with code.
 
M

Mark Durrenberger

It appears that you've actually worked through the "hard stuff" of
connecting an add in.

I would start by recording a few macros doing the things you are likely to
do with your add-in. Look at the recorded macros to see what happens

for example the go to Presentation mode code is here - one button click
generated all this code ?!

Sub Macro1()
'
' Macro recorded 6/2/2004 by Mark Durrenberger
'

With ActivePresentation.SlideShowSettings
.ShowType = ppShowTypeSpeaker
.LoopUntilStopped = msoFalse
.ShowWithNarration = msoTrue
.ShowWithAnimation = msoTrue
.RangeType = ppShowAll
.AdvanceMode = ppSlideShowUseSlideTimings
.PointerColor.SchemeColor = ppForeground
.Run
End With
SlideShowWindows(Index:=1).View.Exit
End Sub


--
_________________________________________________________
Mark Durrenberger, PMP
Principal, Oak Associates, Inc, www.oakinc.com
"Advancing the Theory and Practice of Project Management"
________________________________________________________

The nicest thing about NOT planning is that failure
comes as a complete surprise and is not preceded by
a period of worry and depression.

- Sir John Harvey-Jones
 
M

Mark Durrenberger

Also, go into Powerpoint, Alt-F11 to get to the VBA editor
Go through the help presented there.
You'll be able to read about all the VB events in Powerpoint.

HTH,
Mark


--
_________________________________________________________
Mark Durrenberger, PMP
Principal, Oak Associates, Inc, www.oakinc.com
"Advancing the Theory and Practice of Project Management"
________________________________________________________

The nicest thing about NOT planning is that failure
comes as a complete surprise and is not preceded by
a period of worry and depression.

- Sir John Harvey-Jones
 

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