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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding Notes into PowerPoint Using VBA

Status
Not open for further replies.

mincefish

Programmer
Sep 27, 2001
74
GB
Hello,

My request is a simple one (I hope :))

I want to know how to add notes to a slide. I know how to add the slide, and format the title, etc. Once I've done that, I want to put some standard text into the notes. I figured that as the notes are slide specific, adding notes would be a method of the slide object....obviously not!

At the moment, I'm controlling it from Access, because some of the number of different programs I have to invoke to create a bunch of slides (MapPoint & Excel, plus data from the db)

Here is my code thus far :
Code:
Dim oApp as PowerPoint.Application
Dim oPres as PowerPoint.Presentation
Dim oSlide As PowerPoint.Slide
Dim strPicName As String

' add slide on 
Set oSlide = oPres.Slides.Add(iCtr, ppLayoutTitleOnly)

oSlide.Select

' put in the header, etc
With oApp
      With .ActiveWindow.Selection.TextRange
        .Text = "Potential Population For Statins Usage - " & strPCTName
        With .Font
            .Name = "Arial"
            .Size = 22
            .Bold = msoFalse
            .Italic = msoFalse
            .Underline = msoFalse
            .Shadow = msoFalse
            .Emboss = msoFalse
            .BaselineOffset = 0
            .AutoRotateNumbers = msoFalse
            .Color.SchemeColor = ppTitle
        End With
    End With
End With

All I want to do now is add a note to the slide, and put text in that note....

HELP!!!!

Thanks in advance

The Mincefish
 
OK - well this seems to work. How stupid of me not to take that logical path towards getting it work. I must make sure I learn the PowerPoint Object Model to at least 20 levels.
</rant>
Code:
    oSlide.NotesPage.Shapes(2).TextFrame.TextRange.Text = &quot;This is a note&quot;

Thanks

Mincefish
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top