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 / June 2009

Tip: Looking for answers? Try searching our database.

Text color property not immediately applied in slide show mode

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Nathanael - 30 Jun 2009 21:02 GMT
I'm working with PowerPoint 2007/2003 developing in C++.

I've written code to insert text into a PowerPoint presentation. The code
works, but in slide show mode text is always inserted as black. I set the
color property of the text, but it isn't immediately visible.

When I insert a second text string, the first one changes to have the
correct that I applied to it. I can also get the right color to show up if I
switch back and forth between slides in the running presentation.

This problem only happens in slide show mode, the code works fine in edit
mode.

Here's what I'm doing:

m_TextRangePtr->SetText(szText);
m_FontPtr->AttachDispatch(m_TextRangePtr->GetFont());
m_ColorPtr->AttachDispatch (m_FontPtr->GetColor());
m_ColorPtr->SetRgb(m_clrText);
m_ColorPtr->ReleaseDispatch();
m_FontPtr->ReleaseDispatch();
m_TextRangePtr->ReleaseDispatch();
Nathanael - 30 Jun 2009 21:07 GMT
I really should have edited this better before I posted it ... hopefully this
is clearer...

I'm working with PowerPoint 2007/2003 developing in C++.

I've written code to insert text into a PowerPoint presentation. The code
works, but in slide show mode the text is always black after being inserted.
I set the color property of the text, but it isn't immediately visible.

When I insert a second text string, the first one changes to have the
correct color that I applied to it. I can also get the right color to show
up if I
switch back and forth between slides in the running presentation.

This problem only happens in slide show mode, the code works fine in edit
mode.

Here's what I'm doing:

m_TextRangePtr->SetText(szText);
m_FontPtr->AttachDispatch(m_TextRangePtr->GetFont());
m_ColorPtr->AttachDispatch (m_FontPtr->GetColor());
m_ColorPtr->SetRgb(m_clrText);
m_ColorPtr->ReleaseDispatch();
m_FontPtr->ReleaseDispatch();
m_TextRangePtr->ReleaseDispatch();
Steve Rindsberg - 30 Jun 2009 21:37 GMT
To get some changes to appear during a slide show you need to force the slide to
refresh; the only way to do this is to use the .GoToSlide method of the slide
show window's View.

GoToSlide takes the SlideIndex of the slide you want to go to as a param ... in
this case, you want to go to the same slide as you're already on.

Welcome to PowerPoint.  Wonderful sometimes.  Weird always.

> I really should have edited this better before I posted it ... hopefully this
> is clearer...
[quoted text clipped - 22 lines]
> m_FontPtr->ReleaseDispatch();
> m_TextRangePtr->ReleaseDispatch();

==============================
PPT Frequently Asked Questions
http://www.pptfaq.com/

PPTools add-ins for PowerPoint
http://www.pptools.com/
Nathanael - 30 Jun 2009 21:51 GMT
I wondered if that might turn out to be the case ...

Thanks for the confirmation.

> To get some changes to appear during a slide show you need to force the slide to
> refresh; the only way to do this is to use the .GoToSlide method of the slide
[quoted text clipped - 38 lines]
> PPTools add-ins for PowerPoint
> http://www.pptools.com/
Nathanael - 30 Jun 2009 22:29 GMT
So I gave this a try. It seems that if you call GoToSlide and tell it to go
to your current slide, it doesn't force a redraw. (I'm assuming this is an
intentional optimization by Microsoft.)

Are there any ways to 'force' PowerPoint to refresh/redraw the current slide?

Thanks!

> To get some changes to appear during a slide show you need to force the slide to
> refresh; the only way to do this is to use the .GoToSlide method of the slide
[quoted text clipped - 38 lines]
> PPTools add-ins for PowerPoint
> http://www.pptools.com/
Steve Rindsberg - 30 Jun 2009 23:39 GMT
> So I gave this a try. It seems that if you call GoToSlide and tell it to go
> to your current slide, it doesn't force a redraw. (I'm assuming this is an
> intentional optimization by Microsoft.)

No, quite the opposite.  It *should* force a redraw, and does in VBA.

> Are there any ways to 'force' PowerPoint to refresh/redraw the current slide?
>
[quoted text clipped - 42 lines]
> > PPTools add-ins for PowerPoint
> > http://www.pptools.com/

==============================
PPT Frequently Asked Questions
http://www.pptfaq.com/

PPTools add-ins for PowerPoint
http://www.pptools.com/
 
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



©2010 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.