Powerpoint 2007

  • Thread starter Shrikant Karande
  • Start date
S

Shrikant Karande

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".
 
S

Shrikant Karande

You are right, I am doing this using code. I will post the relevant code ASAP.
 
S

Shrikant Karande

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){}
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top