extracting slide comments on the server

  • Thread starter Thread starter Tomasz Jastrzebski
  • Start date Start date
T

Tomasz Jastrzebski

Hello everybody,

The client needs a server application (windows service) which would
automatically process ppt documents extracting slide comments and sending to
another subsystem.
Is it doable? I have not tried but I guess PPT VBA provides access to this
data?
But then, I guess, I would have to instantiate PPT application on the server
in some security context, which might be an issue, let's say even if I
develop a separate COM+ managed component which could be used by my process.

Please advise.

Tomasz
 
Hello everybody,

The client needs a server application (windows service) which would
automatically process ppt documents extracting slide comments and sending to
another subsystem.
Is it doable? I have not tried but I guess PPT VBA provides access to this
data?
But then, I guess, I would have to instantiate PPT application on the server
in some security context, which might be an issue, let's say even if I
develop a separate COM+ managed component which could be used by my process.

PowerPoint isn't intended to be automated on the server. MS doesn't support
it. There's a link to fairly detailed information here:

Server Office Automation Issues
http://www.rdpslides.com/pptfaq/FAQ00497.htm

That said, if you arrange things so you process one file at a time (that is, do
not try to run more than one instance of PowerPoint) you should be able to make
this work.

You'll have to distinguish between two different types of comments though.
PowerPoint 2000 and previous created one type, 2002 and later another. Example
VBA:

Sub ShowComments()
' This will only work in PPT 2002 or later

Dim oSh as Shape
Dim oSl as Slide
Dim oCmt as Comment

For Each oSl in ActivePresentation.Slides
' examine each shape to see if it's an old-style comment
For Each oSh in oSl.Shapes
If oSh.Type = msoComment Thent
MsgBox oSh.TextFrame.TextRange.Text
End If
Next ' shape
' now look for new-style comments
For Each oCmt in oSl.Comments
MsgBox oCmt.Text
Next ' comment
Next ' slide

End Sub
 

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

Back
Top