Checking for the prescense of background in .ppt file through C#

  • Thread starter Thread starter Atul Bhatia
  • Start date Start date
A

Atul Bhatia

I need to check(in powerpoint 2003 only) that weather a particular slide
contains any background or not....
I tried using the following code :

if (objApp.ActivePresentation.Slides[2].Background != null)

but it is giving non null value even for the slide in which nothing is
present in the background.
Please suggest me a way to do it.
 
Hi Steve,

Thanks for replying.
What I exactly want to do is to extract the image of the background of the
slides in a particular powerpoint presention.
The background when applied individually to all slides gives proper result
with the following
".Background.Fill.Visible property"

But when I apply a particular background to all the slides then this method
seems not to work. Even I tried .FollowMasterBackground then it was giving
the black images for all slides.

Thanks again for replying


Steve Rindsberg said:
I need to check(in powerpoint 2003 only) that weather a particular slide
contains any background or not....

There's always some sort of background, even if it's only blank white.
What exactly are you after?

There are several properties/methods of Slides that may be useful:

.FollowMasterBackground ' Boolean
.DisplayMasterShapes ' Boolean
.Background.Fill.Visible ' Boolean
.Background.Fill.Forecolor.SchemeColor ' Long
or
.Background.Fill.ForeColor.RGB ' long
.Background.Fill.Transparency ' single
.Background.Fill.Solid

I tried using the following code :

if (objApp.ActivePresentation.Slides[2].Background != null)

but it is giving non null value even for the slide in which nothing is
present in the background.
Please suggest me a way to do it.


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

PPTools add-ins for PowerPoint
http://www.pptools.com/
 
Back
Top