Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Computer Certification > Microsoft Certification > Failed to get background of a slide

Reply
Thread Tools

Failed to get background of a slide

 
 
=?Utf-8?B?YXJjaGFuYXNy?=
Guest
Posts: n/a
 
      08-17-2007
Hi,
I have tried to insert a slide from one ppt to another ppt using the
function InsertFromFile. But the background of the inserted slide is lost in
the Destination ppt.
How can I apply its "background" in the Destination ppt.

Since it doesn’t work , I have find out an alternate solution. For each
slide I have created a POT. And then that corresponding POT is applied to the
inserted slide of the Destination ppt. But it works only if the background of
the source ppt is “Applied to all the slides”. If the backround is “Applied
to Selected slides” it doesn’t work.

I have got a PPT ( SOURCEPPT.ppt), having slides with different design
template having different background . For getting the design template of
first slide , i have deleted the other slides of SOURCEPPT.ppt and saved it
as SourceDesign.ppt and SourceDesign.pot. Now the SourceDesign.ppt contains a
slide with template and background of first slide of the SOURCEPPT . I need
that template with its background to be applied to all the slides of that
PPT. I have tried , but its background is lost. How can I apply the
background of one slide to all slides.


Here is the code I have tried:

CString strSourcePPT("D:\\Powerpoint\\SOURCEPPT.ppt");

Presentations presSource( m_ppt->GetPresentations() );
_Presentation SourcePres( presSource.Open( strSourcePPT, FALSE, FALSE, FALSE
) );
Slides SourceSlides( SourcePres.GetSlides() );

int nTotalSlide = SourceSlides.GetCount();
int nDelSlide = nTotalSlide;

for(int nSlideCnt = 1; nSlideCnt < nTotalSlide; ++nSlideCnt)
{
_Slide DeleteSlide( SourceSlides.Item( COleVariant( (long)(nDelSlide) )));
DeleteSlide.Delete();
nDelSlide--;
}

SourcePres.Save();
SourcePres.SaveAs("D:\\Powerpoint\\ SourceDesign.ppt",1,1);
SourcePres.SaveAs("D:\\Powerpoint\\ SourceDesign.pot ",1,1);
SourcePres.Close();

//Applying template to all the slides of SourceDesign.ppt
Presentations presDest( m_ppt->GetPresentations() );
_Presentation DestPres( presDest.Open("D:\\Powerpoint\\ SourceDesign.ppt ",
FALSE, FALSE, FALSE ) );
DestPres.ApplyTemplate(“D:\\Powerpoint\\ SourceDesign.pot”);
DestPres.Save();
DestPres.Close();



I also tried by creating a PPT with some slides, and manually I loaded the
template “SourceDesign.pot”. Background of “SourceDesign.pot” is lost while
it is applied to this PPT.

Thanks in Advance

Archana
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[ANN] Slide Show (S9) Gem V0.6 - New and Improved Support for UsingYour Own Slide Show Templates Gerald Bauer Ruby 0 08-26-2008 08:12 PM
get all word of slide through aspose.slide akshar108 via DotNetMonster.com ASP .Net 0 10-30-2007 04:49 AM
Background Check - Background search - People search mason66 ASP .Net 0 07-27-2006 10:20 AM
Slide-in & slide-out Scroller Help! banyan Javascript 0 11-16-2005 08:05 AM
Good slide scanning service vs. good slide scanner for Do-It-Yourself? LAshooter Digital Photography 0 06-25-2005 07:14 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57