My addin crashes PPT at random intervals.

M

Mike M.

Tested with PPT 2002 and 2003. I have an addin that puts the current
date/time into a text box. PowerPoint crashes and throws up an error dialog
at random intervals from 1/2 hour to several hours. My presentation is
simple text with a "tagged" shape (text box) that my addin looks for and
sticks the time/date into. I am wondering if it is the way I put the text
into the shape. Any comments on the following code? Do I need to delete
the text in the text range each time? Thanks.

Public WithEvents PPTEvent As Application

Private Sub PPTEvent_SlideShowNextSlide(ByVal Wn As SlideShowWindow)
Dim slide As PowerPoint.slide
Dim shp As PowerPoint.Shape
Dim dateStr As String
Dim timeStr As String

' This contains the current slide.
Set slide = Wn.View.slide

' Check each shape for our special shape
For Each shp In slide.Shapes
With shp
If (.Tags.Count > 0) Then
' Check for our date/time shape
If (.Tags.Name(1) = MY_SPECIAL_NAME) Then
' Returns "Wednesday, Jan 27 1993".
dateStr = Format(Date, "dddd, mmm d yyyy")

' format time as desired
' Returns "5:04 PM".
timeStr = Format(Time, "hh:mm AMPM")
.TextFrame.TextRange.text = dateStr & " " & timeStr
End If
End If ' end if tags > 0
End With
Next shp
End Sub
 
M

Mike M.

So far no discernable pattern. We are still trying to gather data. I am
trying to get the error message from my co-worker.
I am trying your code suggestion because I really like the simple life
(Paris mostly). This problem has become a big deal with some customers so I
am scrambling like a monkey on it. Any suggestions greatly appreciated.
 
M

Mike M.

P.S. or maybe B.S. <g> The error is just the typical PowerPoint error box
stating, "Microsoft PowerPoint has encountered a problem and needs to close.
Sorry!".
I am working with MS right now to get my MSDN subscription tied to a NG
alias (they are having web site problems) so my posts will pass the MS
newsreader filters. Maybe then John L. will help out. I'll probably be
toast before that happens.
 
M

Mike M.

Well, if I run with PowerPoint 2003 I do not get a crash running the same
presentation with the same addin. Now isn't that special. :)
How to get all customers to spend $ to upgrade is the next issue.
 
M

Mike M.

To keep everyone interested in this thread up to date ;-) the crash only
occurs in PPT2002 SP3. PPT2002 no SP, SP1 and SP2 are all fine. Someone
slipped in this service pack without extensive testing of our addins.

HTH, CMAO
 
M

Mike M.

No page numbering. Just looking for my "specially" tagged text box shape
and sticking date/time in it. We are able to reproduce the problem
consistently in a matter of a few minutes now so it's easier to test.
Somehow SP3 got slipped onto the machines without the addin being tested.
But who would have thought.... <g>
 
M

Mike_M

I can't imagine how I would determine what was wrong other than PPT2002 SP3
crashes with my specific addin. I have a workaround so unless I get some
spare time I am tabling the issue. I did however manage to get an alias
registered for my MSDN account so that might help me in the future.
 
M

Mike_M

John, can you see me now? ;-)

Mike_M said:
I can't imagine how I would determine what was wrong other than PPT2002 SP3
crashes with my specific addin. I have a workaround so unless I get some
spare time I am tabling the issue. I did however manage to get an alias
registered for my MSDN account so that might help me in the future.
 

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