Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General PowerPoint Questions / August 2006

Tip: Looking for answers? Try searching our database.

My addin crashes PPT at random intervals.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mike M. - 09 Aug 2006 21:21 GMT
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
Steve Rindsberg - 14 Aug 2006 03:01 GMT
> 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
[quoted text clipped - 3 lines]
> into the shape.  Any comments on the following code?   Do I need to delete
> the text in the text range each time?    Thanks.

Any pattern at all to when it crashes?  A particular slide or on a slide with
specific content?

What's the text of the error message?

By the way, you might be able to simplify life by simply doing:

With shp
  If .Tags(MY_SPECIAL_NAME) = "the value you're after" then ...
 
If there are no tags or if the tag you're after hasn't been applied to the
shape, it won't error;  it'l just return ""  

> Public WithEvents PPTEvent As Application
>
[quoted text clipped - 25 lines]
>     Next shp
> End Sub

-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ:  www.pptfaq.com
PPTools:  www.pptools.com
================================================
Mike M. - 14 Aug 2006 14:56 GMT
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.

> > 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
[quoted text clipped - 52 lines]
> PPTools:  www.pptools.com
> ================================================
Mike M. - 14 Aug 2006 15:01 GMT
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.

> So far no discernable pattern.  We are still trying to gather data.  I am
> trying to get the error message from my co-worker.
[quoted text clipped - 62 lines]
> > PPTools:  www.pptools.com
> > ================================================
Mike M. - 14 Aug 2006 20:36 GMT
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.

> 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.
[quoted text clipped - 75 lines]
> > > PPTools:  www.pptools.com
> > > ================================================
Mike M. - 15 Aug 2006 14:41 GMT
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

> 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.  :-)
[quoted text clipped - 9 lines]
> > newsreader filters.  Maybe then John L. will help out.  I'll probably be
> > toast before that happens.
Steve Rindsberg - 16 Aug 2006 04:38 GMT
> 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.  :-)

Not a big surprise ... 2002 had several brutal little anklenibblers that make
it crash with the message you saw (or sometimes just go poof and disappear).

Any chance you're mucking about with the page numbering?
Mike M. - 16 Aug 2006 16:48 GMT
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>

> > 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.  :-)
[quoted text clipped - 3 lines]
>
> Any chance you're mucking about with the page numbering?
Steve Rindsberg - 16 Aug 2006 19:56 GMT
> 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>

4sher.  If you nail the specifics, PLEASE let us know here, 'kay?

> > > Well, if I run with PowerPoint 2003 I do not get a crash running the
> same
[quoted text clipped - 6 lines]
> >
> > Any chance you're mucking about with the page numbering?

-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ:  www.pptfaq.com
PPTools:  www.pptools.com
================================================
Mike_M - 17 Aug 2006 19:05 GMT
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.

> > 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
[quoted text clipped - 3 lines]
>
> 4sher.  If you nail the specifics, PLEASE let us know here, 'kay?
Mike_M - 18 Aug 2006 14:58 GMT
John, can you see me now?  ;-)

> 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
[quoted text clipped - 10 lines]
> >
> > 4sher.  If you nail the specifics, PLEASE let us know here, 'kay?

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.