Mourning the loss of our friend, WhitPhil.
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
 
Business Applications
Tag Cloud
access audio black screen blue screen boot bsod connection crash dell desktop drivers dvd email error excel excel 2003 firefox hard drive hardware hdmi hijackthis internet keyboard laptop malware monitor motherboard network networking outlook problem recovery router safe mode screen slow sound spyware tdlwsp.dll trojan vba video virus vista vundo windows windows 7 windows vista windows xp wireless
Search
Search for:
Tech Support Guy Forums > Software & Hardware > Business Applications >
Saving selected Notes from a PPT

Tip: Click here to scan for System Errors and Optimize PC performance
[ Sponsored Link ]

 
Thread Tools
Red2034's Avatar
Computer Specs
Senior Member with 151 posts.
 
Join Date: Apr 2007
Location: Seattle, WA
Experience: Flash Guru - VBA.... still learning
02-Nov-2009, 02:56 PM #1
Saving selected Notes from a PPT
I have found this code , but it writes out all the notes... I want to have it select a bit of the text not all of it and save it to a file:

Sub SaveNotesText()

Dim oPres As Presentation
Dim oSlides As Slides
Dim oSlide As Slide
Dim oShapes As Shapes
Dim oSh As Shape
Dim NotesText As String
Dim FileNum As Integer
Dim PathSep As String

#If Mac Then
PathSep = ":"
#Else
PathSep = "\"
#End If

Set oPres = ActivePresentation
Set oSlides = oPres.Slides

For Each oSlide In oSlides
' NotesText = NotesText & "Slide" & oSlide.SlideIndex & vbCrLf
Set oShapes = oSlide.NotesPage.Shapes
For Each oSh In oShapes
If oSh.HasTextFrame Then
If oSh.TextFrame.HasText Then
NotesText = NotesText & oSh.TextFrame.TextRange.Text
End If
End If
Next oSh
NotesText = NotesText & vbCrLf
Next oSlide

FileNum = FreeFile
Open oPres.Path & PathSep & "NotesText.TXT" For Output As FileNum
Print #FileNum, NotesText
Close FileNum

End Sub

Last edited by Red2034 : 03-Nov-2009 12:38 AM.
Red2034's Avatar
Computer Specs
Senior Member with 151 posts.
 
Join Date: Apr 2007
Location: Seattle, WA
Experience: Flash Guru - VBA.... still learning
02-Nov-2009, 03:06 PM #2
what I would like the code to do is, select a portion of the notes and add it to a bookmark within a .doc file:

Below is an example of the notes on a slide:

010_010_030
Audio: [1]
*
Instructions:
On entry, play audio.
When user clicks on each element in the screen shot, definitions will appear as on the following pages.
When user clicks forward arrow, go to next page.

Graphics:
Image of <Add graphic description and location>

Narration:
<English>
If this is your first time using the Value University courseware, please click the <b>Launch Demonstration</b> button for a brief tour of the application.</English>
<French>Si c'est votre première fois que vous utilisez la valeur Université didacticiels, veuillez cliquer sur le bouton Lancer démonstration pour une brève visite de l'application.</French>


it should select the <English> tag and drop it into the English bookmark... is that possible???

Thanks for any help
Red2034's Avatar
Computer Specs
Senior Member with 151 posts.
 
Join Date: Apr 2007
Location: Seattle, WA
Experience: Flash Guru - VBA.... still learning
03-Nov-2009, 12:34 AM #3
So, after thinking about this a bit more... I have decided to go about it different...

1. I want to access the notes and convert them to a string var
2. parse the string to only include the <English> tag
3. post that var to the bookmark in the doc

hope this makes it easier to understand, and would like to include a case statement that post the <French> tag if its not empty to the french bookmark..

thanks in advance!
Red
Red2034's Avatar
Computer Specs
Senior Member with 151 posts.
 
Join Date: Apr 2007
Location: Seattle, WA
Experience: Flash Guru - VBA.... still learning
03-Nov-2009, 12:55 AM #4
I have found a delimiter function but will need to see how it works in the morning - I am headed to bed now...


Public Function parse(ByVal inString, Optional ByVal delimiters)
'Take a string, and return it as a one dimensional array
' of individual values as delimited by any of several
' characters. None of those characters are returned in
' the result. Provide a default list of delimiters, which
' should come from registry. But allow override.

Dim delimitList, oneChar, aWord, codeCount
Dim arrayCodes()

If IsMissing(delimiters) Then
'We should get these from Registry
delimitList = " ,/!|"
'Characters recognized as delimiters

Else
delimitList = delimiters
'user can override if needed
End If
Dim i, j, k
i = Len(inString)
For j = 1 To i
'Read one character at a time

oneChar = VBA.Strings.Mid(inString, j, 1)
k = InStr(delimitList, oneChar)
'Is this one a delimiter?
If k = 0 Then
aWord = aWord & oneChar
'If is isn't, add to the current word
End If
If k <> 0 Or j = i Then
'If it is, or if we're finished
If aWord > "" Then
codeCount = codeCount + 1
ReDim Preserve arrayCodes(codeCount)
arrayCodes(codeCount) = aWord
'Save new word
aWord = ""
End If
End If
Next j
parse = arrayCodes
'Return the array
End Function
Red2034's Avatar
Computer Specs
Senior Member with 151 posts.
 
Join Date: Apr 2007
Location: Seattle, WA
Experience: Flash Guru - VBA.... still learning
03-Nov-2009, 10:51 AM #5
Good morning all!!! I am really excited to be back in the VBA swing of things, and excited to be solving this issue - I will post any new developments, Im sure we can solve this one today and mark it off the list!

Red
OBP's Avatar
OBP OBP is offline
Computer Specs
Distinguished Member with 9,329 posts.
 
Join Date: Mar 2005
Location: UK
Experience: An old Basic Programmer
03-Nov-2009, 11:41 AM #6
Red, have you also looked at the Split() function for parsing the String?
Red2034's Avatar
Computer Specs
Senior Member with 151 posts.
 
Join Date: Apr 2007
Location: Seattle, WA
Experience: Flash Guru - VBA.... still learning
03-Nov-2009, 12:16 PM #7
Hmmm not yet...looking now tho
Thanks for the tip I searching on it now...
Red2034's Avatar
Computer Specs
Senior Member with 151 posts.
 
Join Date: Apr 2007
Location: Seattle, WA
Experience: Flash Guru - VBA.... still learning
03-Nov-2009, 01:08 PM #8
Rollin - please take a look!
here is the source files im working with...

the first two functions are what saves ALL the notes and posts to a .txt file the last couple functions are the ones you and I have worked out in the past...
Attached Files
File Type: zip SaveParsedNotes.zip (172.6 KB, 0 views)
Red2034's Avatar
Computer Specs
Senior Member with 151 posts.
 
Join Date: Apr 2007
Location: Seattle, WA
Experience: Flash Guru - VBA.... still learning
04-Nov-2009, 09:20 AM #9
OBP the split() function does look like it would work - I am trying some examples today and Ill let you know how it goes...
OBP's Avatar
OBP OBP is offline
Computer Specs
Distinguished Member with 9,329 posts.
 
Join Date: Mar 2005
Location: UK
Experience: An old Basic Programmer
04-Nov-2009, 09:30 AM #10
Red2034's Avatar
Computer Specs
Senior Member with 151 posts.
 
Join Date: Apr 2007
Location: Seattle, WA
Experience: Flash Guru - VBA.... still learning
04-Nov-2009, 09:56 AM #11
OBP - thanks ill try to work with this sample
Reply Bookmark and Share

Smart Search

Find your solution!



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.

Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -5. The time now is 02:13 AM.
Copyright © 1996 - 2009 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.
Powered by Cermak Technologies, Inc.