Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Text box value into Powerpoint presentation

Status
Not open for further replies.

Gill1978

Programmer
Jun 12, 2001
277
GB
Hi,

I have a web application that merge's powerpoint presentations into one new file which is saved to the Network. I'm using interopt to do this ...

However I need to copy text box values from the web page into th first slide of the new presentation. Does anyone know how to go about doing this ???

Thanks

Julie
 
I've got the following however its causing an error on this line (stating that the new keyword is needed) but I can't see where:

Code:
objSlide = ppPres.Slides.Add(1, Powerpoint.PpSlideLayout.ppLayoutBlank);


Full add new slide code:

Code:
        Powerpoint._Slide objSlide;
        Powerpoint.TextRange objTextRng = null;
        //ppApp.PresentationNewSlide
        objSlide = ppPres.Slides.Add(1, Powerpoint.PpSlideLayout.ppLayoutBlank);
        //objSlide = ppSlides.Add(1, Powerpoint.PpSlideLayout.ppLayoutText);
        objTextRng = objSlide.Shapes[1].TextFrame.TextRange;
        objTextRng.Text = "My Presentation";
 
I haven't worked with creating PPT/xls or docs this way. but usually .net objects work like this
Code:
Powerpoint._Slide objSlide = new Powerpoint.PpSlideLayout.ppLayoutBlank();
ppSlides.Add(1, objSlide);

Powerpoint.TextRange objTextRng = objSlide.Shapes[1].TextFrame.TextRange;
objTextRng.Text = "My Presentation";

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top