Go Back   Velocity Reviews > Newsgroups > Microsoft Certification
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

Microsoft Certification - Failed to get background of a slide

 
Thread Tools Search this Thread
Old 08-17-2007, 02:03 AM   #1
Default Failed to get background of a slide


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


=?Utf-8?B?YXJjaGFuYXNy?=
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Lost Desktop Custom Background nacho Software 0 09-23-2009 11:01 PM
HELP! Can't get rid of desktop background jc1357 General Help Related Topics 14 04-21-2008 01:46 PM
10 Reasons why HD-DVD and Blu-Ray Have Already Failed Black Locust DVD Video 69 07-01-2006 04:24 AM
Re: Brute Force Cracking Failed, No Vulnerable Blocks, DVD Decrypter Martino DVD Video 8 02-01-2006 10:09 PM
background music for my silent home movie help Ninip DVD Video 3 01-01-2006 12:49 AM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

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