Syntax for slide title

  • Thread starter Thread starter AJK
  • Start date Start date
A

AJK

Hey, I need to be able to set the title/header of a PowerPoint slide in
a file I'm generating. Can anyone tell me what the proper syntax is
for the slide title? I'm creating the slide and it looks correct
except that I can't get a title to show up above the picture/text on
the slide. Any assistance would be much appreciated...

~AJK
 
It's a little difficult knowing what you want to do. I'm guessing that you
mean that you are building a slide from within another application by using
code and you want to create a title slide instead of a Title & text slide.
Correct?

If this is the case, just add this line of code:
ActivePresentation.Slides(1).Layout = 1
((Where 1 is the active slide number))

--
Bill Dilworth
Microsoft PPT MVP Team
===============
Please spend a few minutes checking vestprog2@
out www.pptfaq.com This link will yahoo.
answer most of our questions, before com
you think to ask them.

Change org to com to defuse anti-spam,
ant-virus, anti-nuisance misdirection.
..
..
 
Hey, I need to be able to set the title/header of a PowerPoint slide in
a file I'm generating. Can anyone tell me what the proper syntax is
for the slide title? I'm creating the slide and it looks correct
except that I can't get a title to show up above the picture/text on
the slide. Any assistance would be much appreciated...

Show us what you have so far and we'll take it from there.
 
Yes, I am building the slide from within another app... Ideally, I'm
building it to include a graphic (created by the app) and a
title/heading for the graphic, all on the same slide. Getting the
graphic onto the slide is not a big deal, but I can't seem to get the
title to print.

As a side note, I'm using C++/MFC for my programming, and have been
generating the file line by line (example: for (i=0; i<8; i++) os <<
"<o:File HRef=\"" << cell.img_file << "\"/>" << endl;)

I started doing it this way because I was looking at what a colleague
did for something similar, but the more I look around online the more
it seems there is an easier way.... Can I use the syntax you gave
(ActivePresentation.Slides(1).Layout = 1) from within my program if I'm
coding in C++/MFC as long as I include the proper headers?

Thanks much!

~AJK
 
OK, I've gotten a bit more of a clear idea of what to do. I'm assuming
that I should be accessing the slide(s) through
ActivePresentation.Slides, etc., but I'm unclear as to where those
commands go. Should they be generated in the presentation file?
 
Yes, I am building the slide from within another app... Ideally, I'm
building it to include a graphic (created by the app) and a
title/heading for the graphic, all on the same slide. Getting the
graphic onto the slide is not a big deal, but I can't seem to get the
title to print.

As a side note, I'm using C++/MFC for my programming, and have been
generating the file line by line (example: for (i=0; i<8; i++) os <<
"<o:File HRef=\"" << cell.img_file << "\"/>" << endl;)


Ah, you're generating an HTML version of the file for PPT to open, not a PPT
format file.

You'll need to reverse engineer the rest of the HTML that PPT makes to work
this out, I expect. Create a very simple file in PPT, choose a slide layout
that includes a title, type in some text, then save as HTML and see what that
produces.

Bill's example would be used within PPT (VBA) itself or in similar fashion
within a VB/C/Other app controlling PPT via automation.
 
Back
Top