Powerpoint 2007

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

On click of one button I am making 3 copies of ppt from 1st ppt while doing
this I click on the other button to create another 3 copies from a 2nd ppt.
this happens smoothly while using Powerpoint 2003 but I get an error when
using with Powerpoint 2007 of "application busy".
 
On click of one button I am making 3 copies of ppt from 1st ppt while doing
this I click on the other button to create another 3 copies from a 2nd ppt.
this happens smoothly while using Powerpoint 2003 but I get an error when
using with Powerpoint 2007 of "application busy".

I'm assuming you're doing this via code and not manually.

Try posting the relevant code.
 
private void button1_Click(object sender, EventArgs e)
{
try
{
//Starting two different threads.
Thread SlideSelectThrd = new Thread(new
ThreadStart(SlideSelectionApp));
SlideSelectThrd.Start();

Thread SlideThrd = new Thread(new
ThreadStart(SlideSelectionApp1));
SlideThrd.Start();


}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}

private void SelectionOfSlideThrd(int n)
{
string sav = savppt + 0 + n;
objSp = new SlidePresentation();
//SelectSlide is Method in a another class which opens the ppt, copies
//the selected slide and pastes it in a new ppt. it takes 3 parameters :
//1) Ppt to copy slide from(input file name)
//2) New ppt to create from the slide that is copied(output file name)
//3) Where to paste in the new ppt(index)
//Input filename is Test0 and outputs are TesCopy00,TesCopy01,TesCopy02
objSp.SelectSlide(copppt + 0 + ".ppt",sav + ".ppt",1);
}

private void SelectionOfSlideThrd1(int n)
{

string sav = savppt + 1 + n;
objSp = new SlidePresentation();
objSp.SelectSlide(copppt + 1 + ".ppt",
sav + ".ppt",
1);

}

string copppt = "E:\\Test"; string savppt = "E:\\TestCopy";
private void SlideSelectionApp()
{
try
{
for (int n = 0; n < 3; n++)
{
SelectionOfSlideThrd(n);
}
}
catch (Exception ex){}
}

private void SlideSelectionApp1()
{
try
{
for (int n = 0; n < 3; n++)
{

SelectionOfSlideThrd1(n);
}

}
catch (Exception ex){}
}
 
Is there another way to implement something similar ???

Hi Shrikant. I was hoping that someone who can read C# would see this and
comment.

It may be my ignorance of C# or the fact that the coffee isn't working yet this
morning, but I can't work out what you're trying to do here. Can you explain
the problem you're trying to solve and your proposed solution using pseudocode?

Thanks!
 
Back
Top