Notes Panel

T

Troot

Hi,

I'm trying to select the contents of the notes panel using VBA. I have
this much:
For Each j In ActiveWindow.Panes
If j.ViewType = ppViewNotesPage Then
j.Activate
'ActiveWindow.Selection.TextRange = "Howdy"
ActiveWindow.Selection.TextRange.Characters(1, 5).Select
MsgBox ActiveWindow.Selection.TextRange
End If
Next

But no matter what I do, I can't seem to select to select the text that
is already there. I can add text alright, but can't select anything
that was inserted already. I really need to get this working.

Does anyone know how I can do this??

Thanks
John
 
T

Troot

its ok, found out how in this handy little script:
Sub Save_NotesText_in_Textfile()
Dim ppPower As Presentation
Dim ppSlids As Slides
Dim ppSlide As Slide
Dim ppShaps As Shapes
Dim ppShape As Shape
Dim NotesText As String
Dim FileNum As Integer
Dim PathSep As String
#If Mac Then
PathSep = ":"
#Else
PathSep = "\"
#End If
Set ppPower = ActivePresentation
Set ppSlids = ppPower.Slides
For Each ppSlide In ppSlids
NotesText = NotesText & "Slide " & ppSlide.SlideIndex & vbCrLf
Set ppShaps = ppSlide.NotesPage.Shapes
For Each ppShape In ppShaps
If ppShape.HasTextFrame Then
If ppShape.TextFrame.HasText Then
NotesText = NotesText & ppShape.TextFrame.TextRange.Text
End If
End If
Next ppShape
NotesText = NotesText & vbCrLf
Next ppSlide
FileNum = FreeFile
Open ppPower.Path & PathSep & "NotesText.TXT" For Output As FileNum
Print #FileNum, NotesText
Close FileNum
End Sub

taken from http://wbrnet.brinkster.net/vba/

thanks
 
S

Shyam Pillai

To select the text in the notes pane you can add the following two lines:

Call ActiveWindow.Panes(3).Activate
Call CommandBars.FindControl(Id:=756).Execute
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top