Powerpoint add ins and pack and go

S

steve w

I am trying to achieve the following in a Delphi application.

1. Show a playlist of presentations within a window that can also have a
ticker news feed running on top of the window at the bottom.

There are some OLE automation commands within Delphi but no help files. I
have been advised to look at the help files within office for visual basic.
This is like reading a German manual as I have only ever used Delphi. I
believe I can control menu items etc. So in VBA what is the syntax to do
say:

click file
click save as

or

click slide show
click set up show or set 3D show(an add on).

If I could look at these I may be able to achieve my goals.

How do I program PowerPoint to hide all menus.

2. If this cannot work how do I use the viewer to show a playlist windowed.
Are there any command line options for the viewer.

I am using Delphi 7 and powerpoint 2002.

Any help appreciated
 
C

Chirag

The following Delphi code would start PowerPoint and create an empty
presentation and show the "Save As" dialog box.

procedure ShowSaveAs;
var
PowerPoint: Variant;
begin
PowerPoint := CreateOleObject('PowerPoint.Application');
PowerPoint.Visible := True;
PowerPoint.Presentations.Add;
PowerPoint.CommandBars.FindControl(Id:=748).Execute
end;

Make sure you use ComObj unit in your source.

Replace the 748 with 2744 to show the "Set Up Show" dialog box.

- Chirag
 
M

My Name

many thanks.

how do I get the list of command bar numbers.

Is there a way to know when apresentation has ended.
So I can then show the next in the list
 
C

Chirag

You can use the following VBA code snippet to find all menu items till Id
100,000 and write them to the file supplied to it as a parameter:

---
Sub WriteMsoControls(ByVal FileName As String)
Dim I As Long
Dim CBC As CommandBarControl

Open FileName For Output As #1
Write #1, "Id", "Type", "Caption"
For I = 1 To 100000
Set CBC = CommandBars.FindControl(Id:=I)
If Not (CBC Is Nothing) Then
With CBC
Write #1, .Id, .Type, .Caption
End With
End If
Next
Close #1
End Sub
---

There are many till 5000 and a few from 30,000 to 32,000. You may want to
change the code to restrict the scan between these ranges. With today's fast
machines, you would probably save a second.

PowerPoint 2000 and later support events. In your Delphi code, you would
have to implement event sinks. Implement the IDispatch interface and
register with PowerPoint - it would call the IDispatch.Invoke() method when
a slide show ends - look for dispid 2014.

If you don't want to go the COM way, you may want to keep polling for
PowerPoint.SlideShowWindows.Count(). It would return 0 when the slide show
finishes. You can execute a busy wait loop on it. Keep in mind that there
are certain time frames when PowerPoint rejects automation calls. Make sure
you have a try-except block in your Delphi code to catch the EOleSysError
object with error code RPC_E_CALL_REJECTED and ignore the error.

- Chirag
 
S

Steve Warburton

I do not know how to put this into a file. I have tried within VBA but do
not understand the syntax.

Thanks for the help so far.
 
J

John Langhans [MSFT]

[CRITICAL UPDATE - Anyone using Office 2003 should install the critical
update as soon as possible. From PowerPoint, choose "Help -> Check for
Updates".]

Hello,

As you have discovered, PowerPoint doesn't provide the functionality that
you are looking for without resorting to VBA or add-ins.

If you (or anyone else reading this message) think that it's important that
PowerPoint provide this kind of functionality (without having to resort to
VBA or add-ins), don't forget to send your feedback (in YOUR OWN WORDS,
please) to Microsoft at:

http://register.microsoft.com/mswish/suggestion.asp

As with all product suggestions, it's important that you not just state
your wish but also WHY it is important to you that your product suggestion
be implemented by Microsoft. Microsoft receives thousands of product
suggestions every day and we read each one but, in any given product
development cycle, there are only sufficient resources to address the ones
that are most important to our customers so take the extra time to state
your case as clearly and completely as possible.

IMPORTANT: Each submission should be a single suggestion (not a list of
suggestions)

John Langhans
Microsoft Corporation
Supportability Program Manager
Microsoft Office PowerPoint for Windows
Microsoft Office Picture Manager for Windows

For FAQ's, highlights and top issues, visit the Microsoft PowerPoint
support center at: http://support.microsoft.com/default.aspx?pr=ppt
Search the Microsoft Knowledge Base at:
http://support.microsoft.com/default.aspx?pr=kbhowto

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of any included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
 

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