Microsoft KB Archive/307792

= Use Visual Basic for Applications to extract slide notes in PowerPoint 2002 =

Article ID: 307792

Article Last Modified on 8/13/2007

-

APPLIES TO


 * Microsoft PowerPoint 2002 Standard Edition
 * Microsoft Visual Basic for Applications 6.0

-



This article was previously published under Q307792



SUMMARY
You may want to extract all note information that is associated with your slides in Microsoft PowerPoint 2002. This article contains sample Microsoft Visual Basic for Applications (VBA) code that is contained in a macro. This code demonstrates how to retrieve and how to print out comments in the Debug window from each slide in a PowerPoint presentation.



MORE INFORMATION
Microsoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and the tools that are used to create and debug procedures. Microsoft support professionals can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements. If you have limited programming experience, you may want to contact a Microsoft Certified Partner or the Microsoft fee-based consulting line at (800) 936-5200. For more information about Microsoft Certified Partners, visit the following Microsoft Web site:

https://solutionfinder.microsoft.com/

For additional information about the support options available from Microsoft, visit the following Microsoft Web site:

http://support.microsoft.com/default.aspx?scid=fh;[LN;CNTACTMS]

Note The following macro examples work only in PowerPoint. Visual Basic for Applications macros are not supported by the Microsoft PowerPoint Viewer. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

230746 PPT: Viewer: Presentation Macros Don't Run Within the Viewer

Sub GetAllComments

'Loop through all slides in presentation For a = 1 To ActivePresentation.Slides.Count Debug.Print &quot;**********Slide #&quot; & a & &quot;**********&quot; 'Loop through all comments on a slide For i = 1 To ActivePresentation.Slides(a).Comments.Count With ActivePresentation.Slides(a).Comments(i) Debug.Print .Author & &quot; &quot; & .DateTime Debug.Print vbTab & .Text End With Next Next MsgBox &quot;To see the results, open the &quot; _ & &quot;Immediate Window in the Visual Basic Editor.&quot; _ , vbInformation, &quot;Macro Completed&quot; End Sub

