Results 1 to 2 of 2
  1. #1
    4 Star Lounger
    Join Date
    Apr 2001
    Thanked 0 Times in 0 Posts

    Transferring PowerPoint notes pages to Word (VBA PowerPoint/Word 2000)

    Is there a way use a macro to transfer information from the Notes pages in a PowerPoint file to a Word file?

    Sure I know you can cut and paste, but that's tedious. I've never tried VBA between applications before, but I can't help but think it can be done.


  2. #2
    Silver Lounger
    Join Date
    Mar 2001
    Springfield, Ohio, USA
    Thanked 2 Times in 2 Posts

    Re: Transferring PowerPoint notes pages to Word (VBA PowerPoint/Word 2000)

    As you probably know, you can use the File | Send To | Microsoft Word menu to do this, but you also get a copy of the slides. However, since the slides are all in column 2, you can just delete this column, but now it is unclear what slide you are on. Here is a macro that sends the first placeholder and the notes to word. If you record a dummy macro and then edit that macro, you can replace the dummy with the code below. Copy the code below, then paste it into a blank word document, select the text in Word, and use that text to replace your dummy macro (gets rid of htlm formatting). Finally, while editing the macro, you must use the Tools | References to set a reference to the Microsoft Word Object Library. HTH --Sam
    <pre>Option Explicit

    Sub sendNotesToWord()
    Dim wrdApp As New Word.Application
    Dim wrdDoc As Word.Document
    Dim intSaveView As Integer
    Dim intSaveNumber As Integer
    Dim i As Integer
    intSaveView = ActiveWindow.ViewType
    intSaveNumber = ActiveWindow.Selection.SlideRange.SlideNumber
    wrdApp.Visible = True
    Set wrdDoc = wrdApp.Documents.Add
    For i = 1 To ActiveWindow.Presentation.Slides.Count
    ActiveWindow.View.GotoSlide i
    ActiveWindow.ViewType = ppViewSlide
    wrdDoc.Range.InsertAfter "Slide " & i & ": "
    With ActiveWindow.Selection.SlideRange.Shapes(1)
    If .HasTextFrame Then
    wrdDoc.Range.InsertAfter .TextFrame.TextRange.Text & vbCr & vbCr
    wrdDoc.Range.InsertAfter vbCr & vbCr
    End If
    End With
    ActiveWindow.ViewType = ppViewNotesPage
    wrdDoc.Range.InsertAfter _
    ActiveWindow.Selection.SlideRange.Shapes(2).TextFr ame.TextRange.Text
    wrdDoc.Range.InsertAfter vbCr & vbCr & "-----" & vbCr & vbCr
    Next i
    ActiveWindow.ViewType = intSaveView
    ActiveWindow.View.GotoSlide intSaveNumber
    End Sub</pre>

    <font face="Comic Sans MS">Sam Barrett, CACI </font face=comic>
    <small>And the things that you have heard... commit these to faithful men who will be able to teach others also. 2 Timothy 2:2</small>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts