PowerPoint tips, hints and tutorials that will change your presentations for ever!



Custom Shows
vba code
Games for teachers
Flash Cards
Multiple Instances
PowerPoint 2007
Mail Merge
Random events
Set spellcheck language

Home buttonTutorial buttonContact buttonProducts button

PowerPoint - Open All comments

If you are working on a presentation that has many review comments on a slide sometimes it would be useful to see them all at once. The bad news is you can't, every time one is opened all others close. I guess the reason is that the slide could be obscured with comments.

The code below add a shape for each comment and arranged them neatly down the right side of the slide.

The second code can be used to delete them all or of course you can delete them manually.

Sub Add_Comments() 
    Dim osld As Slide 
    Dim oComm As Comment 
    Dim strComText As String 
    Dim setH As Single 
    Set osld = ActiveWindow.View.Slide 
    For Each oComm In osld.Comments 
         'get data
        strComText = strComText & oComm.AuthorInitials & oComm.AuthorIndex & "   " 
        strComText = strComText & Format(oComm.DateTime, "dd/mm/yyyy") & vbCrLf 
        strComText = strComText & oComm.Text & vbCrLf 
         'add shapes
        With osld.Shapes.AddShape(msoShapeFoldedCorner, _ 
            Left:=ActivePresentation.PageSetup.SlideWidth - 100, _ 
            Top:=setH, _ 
            Width:=100, _ 
            .Fill.ForeColor.RGB = RGB(255, 255, 215) 
            .Line.ForeColor.RGB = RGB(200, 200, 200) 
            .Tags.Add "COMM", "YES" 
             'format text
            With .TextFrame 
                .TextRange = strComText 
                .TextRange.Font.Color.RGB = vbBlack 
                .TextRange.Font.Size = 9 
                .TextRange.ParagraphFormat.Alignment = ppAlignLeft 
                .VerticalAnchor = msoAnchorTop 
                .WordWrap = True 
                .AutoSize = ppAutoSizeShapeToFitText 
            End With 
             ' get new top value
            setH = setH + .Height 
        End With 
         'set text to nothing
        strComText = "" 
    Next oComm 
End Sub 
Sub zap() 
    Dim osld As Slide 
    Dim L As Long 
    Set osld = ActiveWindow.View.Slide 
    For L = osld.Shapes.Count To 1 Step -1 
        If osld.Shapes(L).Tags("COMM") = "YES" Then osld.Shapes(L).Delete 
    Next L 
End Sub 

Don't know what to do with the code? See here.



Back to the Index Page


Articles on your favourite sport

Free Microsoft PowerPoint Advice, help and tutorials, Template Links
This website is sponsored by Technology Trish Ltd
© Technology Trish 2007
Registered in England and Wales No.5780175
PowerPoint® is a registered trademark of the Microsoft Corporation