Click here to Skip to main content
15,881,559 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I am using VS2013 powerpoint Add-in for creating Agenda slide(that is, creating a slide with all the titles of an active presentation).

My question is how to create a textbox inside the placeholder of subtitle in a slide.
That is, for example, in a slide we have placeholders for title and subtitle- in title i am adding text as,
presentation.Slides[1].Shapes.Title.TextFrame.TextRange.Text = "Agenda";

And I am able to add a textbox like
PowerPoint.Shape textBox1 = presentation.Slides[1].Shapes.AddTextbox(
Office.MsoTextOrientation.msoTextOrientationHorizontal, 0, 0, 600, 50);
textBox1.TextFrame.TextRange.InsertAfter(presentation_text);

Here, the presentation_text contains all the titles of the active presentation.

But the thing is i want the text box to appear inside subtitle placeholder or section.

Please help me:(
Thanks in Advance!!!
Posted

1 solution

txtbox mytxtbx= new txtbox();
mytxtbx.Text="Enter the text here:";
myTxtbx.OnFocus += OnFocus.EventHandle(RemoveText);
myTxtbx.LoseFocus += LoseFocus.EventHandle(AddText);

public RemoveText(object sender, EventArgs e)
{
myTxtbx.Text = "";
}

public AddText(object sender, EventArgs e)
{
if(myTxtbx.Text == "")
myTxtbx.Text = "Enter text here...";
}
 
Share this answer
 
Comments
Deepu S Nair 18-Mar-15 7:38am    
?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900