Find Text in slideshow

Hi Guys

I have a slide show with 100 slides

I have a text area on the front page and a button called search

I am trying to find a macro that will allow me to type into the text box and 
click search and have it jump to the page it finds that word on

any help would be greatly appreciated
0
Utf
1/7/2010 4:35:01 PM
powerpoint 2011 articles. 0 followers. Follow

4 Replies
861 Views

Similar Articles

[PageSpeed] 24

On 1/7/10 11:35 AM, in article
46B6BC3F-4693-4445-B1CD-B9379A7B665E@microsoft.com, "Haggistech"
<Haggistech@discussions.microsoft.com> wrote:

> Hi Guys
> 
> I have a slide show with 100 slides
> 
> I have a text area on the front page and a button called search
> 
> I am trying to find a macro that will allow me to type into the text box and
> click search and have it jump to the page it finds that word on
> 
> any help would be greatly appreciated

Something along these lines should work for you (watch out for
newsgroup-induced line breaks). Also note that this is using a MsgBox, but
you should be able to translate that into getting the text from your text
box.

Sub SearchForString()
    Dim SearchString As String
    Dim oSld As Slide
    Dim oShp As Shape
        
    SearchString = InputBox("Search for:")
    For Each oSld In ActivePresentation.Slides
        For Each oShp In oSld.Shapes
            If oShp.HasTextFrame Then
                If oShp.TextFrame.TextRange.Find(SearchString) Is Nothing =
False Then
                    ActivePresentation.SlideShowWindow.View.GotoSlide
oSld.SlideIndex
                    GoTo Done
                End If
            End If
        Next oShp
    Next oSld
Done:
End Sub


-- 
David M. Marcovitz
Author of _Powerful PowerPoint for Educators_
http://www.PowerfulPowerPoint.com/
Microsoft PowerPoint MVP
Associate Professor, Loyola University Maryland


0
David
1/7/2010 5:14:08 PM

"David Marcovitz" wrote:

> On 1/7/10 11:35 AM, in article
> 46B6BC3F-4693-4445-B1CD-B9379A7B665E@microsoft.com, "Haggistech"
> <Haggistech@discussions.microsoft.com> wrote:
> 
> > Hi Guys
> > 
> > I have a slide show with 100 slides
> > 
> > I have a text area on the front page and a button called search
> > 
> > I am trying to find a macro that will allow me to type into the text box and
> > click search and have it jump to the page it finds that word on
> > 
> > any help would be greatly appreciated
> 
> Something along these lines should work for you (watch out for
> newsgroup-induced line breaks). Also note that this is using a MsgBox, but
> you should be able to translate that into getting the text from your text
> box.
> 
> Sub SearchForString()
>     Dim SearchString As String
>     Dim oSld As Slide
>     Dim oShp As Shape
>         
>     SearchString = InputBox("Search for:")
>     For Each oSld In ActivePresentation.Slides
>         For Each oShp In oSld.Shapes
>             If oShp.HasTextFrame Then
>                 If oShp.TextFrame.TextRange.Find(SearchString) Is Nothing =
> False Then
>                     ActivePresentation.SlideShowWindow.View.GotoSlide
> oSld.SlideIndex
>                     GoTo Done
>                 End If
>             End If
>         Next oShp
>     Next oSld
> Done:
> End Sub
> 
> 
> -- 
> David M. Marcovitz
> Author of _Powerful PowerPoint for Educators_
> http://www.PowerfulPowerPoint.com/
> Microsoft PowerPoint MVP
> Associate Professor, Loyola University Maryland
> 
> 
> .
> 
Thats great it works

is it possible to use the form to show a find next so you can go to next 
found item
0
Utf
1/8/2010 9:29:01 AM
On 1/8/10 4:29 AM, in article
723A96F3-623C-4F0C-AF50-985A326095C4@microsoft.com, "Haggistech"
<Haggistech@discussions.microsoft.com> wrote:

> 
> 
> "David Marcovitz" wrote:
> 
>> On 1/7/10 11:35 AM, in article
>> 46B6BC3F-4693-4445-B1CD-B9379A7B665E@microsoft.com, "Haggistech"
>> <Haggistech@discussions.microsoft.com> wrote:
>> 
>>> Hi Guys
>>> 
>>> I have a slide show with 100 slides
>>> 
>>> I have a text area on the front page and a button called search
>>> 
>>> I am trying to find a macro that will allow me to type into the text box and
>>> click search and have it jump to the page it finds that word on
>>> 
>>> any help would be greatly appreciated
>> 
>> Something along these lines should work for you (watch out for
>> newsgroup-induced line breaks). Also note that this is using a MsgBox, but
>> you should be able to translate that into getting the text from your text
>> box.
>> 
>> Sub SearchForString()
>>     Dim SearchString As String
>>     Dim oSld As Slide
>>     Dim oShp As Shape
>>         
>>     SearchString = InputBox("Search for:")
>>     For Each oSld In ActivePresentation.Slides
>>         For Each oShp In oSld.Shapes
>>             If oShp.HasTextFrame Then
>>                 If oShp.TextFrame.TextRange.Find(SearchString) Is Nothing =
>> False Then
>>                     ActivePresentation.SlideShowWindow.View.GotoSlide
>> oSld.SlideIndex
>>                     GoTo Done
>>                 End If
>>             End If
>>         Next oShp
>>     Next oSld
>> Done:
>> End Sub
>> 
>> 
>> -- 
>> David M. Marcovitz
>> Author of _Powerful PowerPoint for Educators_
>> http://www.PowerfulPowerPoint.com/
>> Microsoft PowerPoint MVP
>> Associate Professor, Loyola University Maryland
>> 
>> 
>> .
>> 
> Thats great it works
> 
> is it possible to use the form to show a find next so you can go to next
> found item

Great, I'm glad it works for you. Adding a Find Next is certainly possible.
I don't have time to whip it together for you, but the simplest thing is
probably to adjust the procedure above in one of a couple of ways:

(1) You could change the loop through the slides from a For Each loop to a
loop that goes from the next slide to the last slide. Something like
(warning: this is air code):

For i = ActivePresentation.SlideShowWindow.View.Slide.SlideIndex To _
    ActivePresentation.Slides.Count

so it only loops from the next slide to the last.

(2) You could add an If statement around the GoToSlide and Go To Done
statements to ask if the SlideIndex is greater than the current slide's
SlideIndex. Something like:

If oSld.SlideIndex > _
    ActivePresentation.SlideShowWindow.View.Slide.SlideIndex Then

You also might want to have right before Done: a

MsgBox "Text not found"

statement to let people know the text was not found.

--David

-- 
David M. Marcovitz
Author of _Powerful PowerPoint for Educators_
http://www.PowerfulPowerPoint.com/
Microsoft PowerPoint MVP
Associate Professor, Loyola University Maryland


0
David
1/8/2010 4:05:45 PM

"David Marcovitz" wrote:

> On 1/8/10 4:29 AM, in article
> 723A96F3-623C-4F0C-AF50-985A326095C4@microsoft.com, "Haggistech"
> <Haggistech@discussions.microsoft.com> wrote:
> 
> > 
> > 
> > "David Marcovitz" wrote:
> > 
> >> On 1/7/10 11:35 AM, in article
> >> 46B6BC3F-4693-4445-B1CD-B9379A7B665E@microsoft.com, "Haggistech"
> >> <Haggistech@discussions.microsoft.com> wrote:
> >> 
> >>> Hi Guys
> >>> 
> >>> I have a slide show with 100 slides
> >>> 
> >>> I have a text area on the front page and a button called search
> >>> 
> >>> I am trying to find a macro that will allow me to type into the text box and
> >>> click search and have it jump to the page it finds that word on
> >>> 
> >>> any help would be greatly appreciated
> >> 
> >> Something along these lines should work for you (watch out for
> >> newsgroup-induced line breaks). Also note that this is using a MsgBox, but
> >> you should be able to translate that into getting the text from your text
> >> box.
> >> 
> >> Sub SearchForString()
> >>     Dim SearchString As String
> >>     Dim oSld As Slide
> >>     Dim oShp As Shape
> >>         
> >>     SearchString = InputBox("Search for:")
> >>     For Each oSld In ActivePresentation.Slides
> >>         For Each oShp In oSld.Shapes
> >>             If oShp.HasTextFrame Then
> >>                 If oShp.TextFrame.TextRange.Find(SearchString) Is Nothing =
> >> False Then
> >>                     ActivePresentation.SlideShowWindow.View.GotoSlide
> >> oSld.SlideIndex
> >>                     GoTo Done
> >>                 End If
> >>             End If
> >>         Next oShp
> >>     Next oSld
> >> Done:
> >> End Sub
> >> 
> >> 
> >> -- 
> >> David M. Marcovitz
> >> Author of _Powerful PowerPoint for Educators_
> >> http://www.PowerfulPowerPoint.com/
> >> Microsoft PowerPoint MVP
> >> Associate Professor, Loyola University Maryland
> >> 
> >> 
> >> .
> >> 
> > Thats great it works
> > 
> > is it possible to use the form to show a find next so you can go to next
> > found item
> 
> Great, I'm glad it works for you. Adding a Find Next is certainly possible.
> I don't have time to whip it together for you, but the simplest thing is
> probably to adjust the procedure above in one of a couple of ways:
> 
> (1) You could change the loop through the slides from a For Each loop to a
> loop that goes from the next slide to the last slide. Something like
> (warning: this is air code):
> 
> For i = ActivePresentation.SlideShowWindow.View.Slide.SlideIndex To _
>     ActivePresentation.Slides.Count
> 
> so it only loops from the next slide to the last.
> 
> (2) You could add an If statement around the GoToSlide and Go To Done
> statements to ask if the SlideIndex is greater than the current slide's
> SlideIndex. Something like:
> 
> If oSld.SlideIndex > _
>     ActivePresentation.SlideShowWindow.View.Slide.SlideIndex Then
> 
> You also might want to have right before Done: a
> 
> MsgBox "Text not found"
> 
> statement to let people know the text was not found.
> 
> --David
> 
> -- 
> David M. Marcovitz
> Author of _Powerful PowerPoint for Educators_
> http://www.PowerfulPowerPoint.com/
> Microsoft PowerPoint MVP
> Associate Professor, Loyola University Maryland
> 
> 
> .
> 


sorry mate i am not sure how to do that
0
Utf
1/22/2010 4:01:01 PM
Reply:

Similar Artilces:

Joining queries in advanced find
Hi, We are having a major issue with one of our CRM customers. They are trying to do a mail merge via word but cannot get the data they required into a single view via advanced find in CRM. The reason for this is that you cannot seem to outer join 2 queries within an advanced find. We can see 2 ways to achieve what we need – could you or one of your colleagues advise on the solutions below: 1) How can we search 2 or more relationships, so that if a match is found in either, the result is returned? E.g. Entity A may be related to Entity B or Entity C, both of which are related to...

Using wildcards in CString::Find() #2
Using wildcards in CString::Find() I’d like to use the wildcards(" * ", " ? " and other) in CString::Find(), but it does not work. Always it returns -1. Could you advice me ? I must do the complicated searching. Maybe there are other ways for the substring searching . Alur. ...

Combine Hyperlink with Text
We use hyperlinks on our analysis spreadsheets so that people are able to trace back to the source data file easily. I like to be able to combine the hyperlink with some standard text so that the hyperlink makes more sense (Source: Insureds File: Hyperlink for example) . Does anyway know if this is possible? Cheers Lee The syntax for the HYPERLINK( ) function is: HYPERLINK(link_location,friendly_name) This enables you to put a user defined description (friendly_name) which will appear on the spreadsheet, so you could have something like "Jump to Insureds File". Hope th...

How do i rotate the text TO FIT THE Paper vertically?
...

text alignment code
what's the correct vb syntax for left-aligning the text in a cell? thanks k483 -- k483 ------------------------------------------------------------------------ k483's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=10791 View this thread: http://www.excelforum.com/showthread.php?threadid=386434 select the cell With Selection .HorizontalAlignment = xlLeft End with "k483" wrote: > > what's the correct vb syntax for left-aligning the text in a cell? > > thanks > > k483 > > > -- > k483 > --------...

linking text
I would like to link the entries in the table of context to their respective pages. In other words, one could click on the article they'd like to read and it will bring them right to that page. Is that possible in Publisher without making separate text boxes for each item in the TOC? I'd appreciate any ideas! Thanks! Shannon ...

Outlook 2003, deleting incoming email text
I am receiving email from people, only to open the email and see that the text message is not there...blank. This happens to about 50% of my incoming messages, with no apparent consistant manner. Any ideas would be greatly appreciated. Thanks. you probably have your mail set to rich text or html and those messages are coming in plain text, or just the opposite. >-----Original Message----- >I am receiving email from people, only to open the email >and see that the text message is not there...blank. This >happens to about 50% of my incoming messages, with no >appa...

Exporting to Excel from Advanced Find
When I've done an advanced find search and then exported that list to excel, it closes the Advanced Find window automatically. It never used to happen and now all of a sudden it happens. It used to bring up a pop up box saying You are about to navigate away from this page... Is there anyway to stop Advanced Find automatically closing after exporting to excel? Hi Anne, This behaviour doesn't sound familiar to me. Have you performed customizations lately? Maybe some installs of a rollup package or hotfix? -- Ronald Lemmen - MSCRM MVP Avanade Netherlands http://www.ronaldlemmen...

Text
How do I wrap text around a circle? If you create a circle and bring it to the front of your text, the text will wrap. What version Publisher are you using? -- Mary Sauer "Lindy" <Lindy@discussions.microsoft.com> wrote in message news:826F6D60-1E0F-4A68-815B-E093E2082774@microsoft.com... > How do I wrap text around a circle? ...

Searching based on text
I am building an Excel to recall stats for TV sports. There are three workbooks, Home, Away and League. The league sheet has all of last season's stats. In all workbooks the player's name is in column A. Because each player has different stats based on his position, I want to select the columns returned based on a text string. Example: In cell A4 of the home sheet is the name JOE SMITH. In A4 is the text CB. In cell B5 is the name JOHN DOE and in B4 the text QB. For the CB it needs to return stats from column G, H, J and N based on the player's name. For the QB...

convert mails to text ?
Hello, I do have some 1000 mails. Is it possible to convert them into a large textfile ? Frank yeah, just do file, import/export, export to file etc etc N "Frank Thiel" <fthiel@gmx.de> wrote in message news:3ff088ef_1@news.arcor-ip.de... > Hello, > I do have some 1000 mails. Is it possible to convert them into a large > textfile ? > Frank > > select all, file, save as text. -- Diane Poremsky [MVP - Outlook] Author, Teach Yourself Outlook 2003 in 24 Hours Coauthor, OneNote 2003 for Windows (Visual QuickStart Guide) Outlook Tips: http://www.outlook-tip...

can't find
i have a small problem...i have windows xp professional, when i got it my boss deleted many programs to save room for design programs...and now i don't know if it came with excel on it...and now i need it. How would i find out if it should have had it and is there any way to get it back without having to go buy a whole new program? You don't get Excel with an operating system. Excel would have to be installed either o its own or as part of an installation of MS Office. -- RMC,CPA "sabrina" <sabrina@coluccisjewelry.com> wrote in message news:020601c36294$6f4d61d0...

Text Box #2
Besides some other strange problems with Publisher 2007, now whenever I use the text box, there's a round circle with 4 small lines sticking out of the circle. I can't delete the 'symbol' without deleting the whole text box! Used to work correctly before I had to re-install. Used to just have a clean empty text box. Now there's this round symbol in it. Help! Are you using the trial version? Do a detect and repair from the help menu. Can you do a print screen and send me the result? mary-sauer at columbus.rr.com -- Mary Sauer MSFT MVP http://office.microsoft.com...

column of text cells
I have a column of country names entered as text, and I need to graph the number of occurances of each country. Help please! Got it. Thanks anyway! ...

Need VBA Code to Select text boxes in spreadsheet
I have a spreadsheet (Excel 2003) of data copied from a web page that has critical data contained in a column of 400 text boxes. I need to remove the text boxes from the spreadsheet, but retain the data. So far, I have been able to address the text boxes one at a time from VBA and extract the data, but I need to know how to address them from within the code. The text boxes are named HTMLText1 through HTMLText400. I can generate the names using a For loop, but using them to address the text boxes stumps me. Dim strThisBoxName As String Dim intValue As Integer ...

POP- How to find out when an Invoice was matched against a Purchase Receipt
Hello Everyone, I wonder where to look for the Invoices being matched against the Receipts entered by the shipping. I see some data by POP Type in a Table POP30310, but I am wondering if I can match Invoice Date column found in GP with a column in Table POP30310 or any in PM20000 and so far I am not able to find. The reason why I am doing all is; sometimes at the end of the month we have Invoices before the Receipts, so the Invoice date is before the Receipt which will eventually upset the RNI report and it will be other way around like Invoiced Not Received INR and here I nee...

alpha-blend text using GDI
Hi all, I was wondering if there is any way to do text alpha-blending using GDI. My original thought is that draw the text to a bitmap first and then alphablend the bitmap which should be easier. But it turns out this scheme can not be easily fitted into our project due to the fact that we support zooming (the text quality is really bad when you zoom in/out bitmap). Is there any other way to do text alpha-blending using GDI? (GDI+ is not a choice to us) Thanks. Darrian ...

how to draw static text in a dialog
I creat a dilog and want to display some lines in the static text of the dialog . this is code: CWnd *pWnd = (CWnd*)GetDlgItem(IDC_mystatictext); CDC* pDC= CWnd::GetDC(); pDC->MoveTo(0, 0); pDC->LineTo(600, 400); but it just display in the dialog and cannot display in the static text! I just a newer one to study vc,thanks for yous help. You dont have to draw anything. Simply call SetWindowText on it: CWnd *pWnd = GetDlgItem(IDC_mystatictext); ASSERT_VALID(pWnd); pWnd->SetWindowText(_T("SomeText")); --- Ajay liuerbin2000@163.com wrote: > I creat a dilog and want t...

Access Excel Linked Text and Number Issues
Question for Access and Excel XP (2002). I have linked an Excel Spreadsheet (Database) to Access for updating and other special Access functions. The Excel data contains a unique identifier (Key field) call Serial Numbers (SN) that contains 13 characters. Some SN contain numbers only, while other SN’s contain numbers and one letter i.e; 99923J143567. When linking the data together Excel identifies the SN’d item as GENERAL, while Access pulls the information in as TEXT. Access then adds a hash mark (‘) to the beginning of each SN containing digits only (no letters) i.e; ‘99923J14346...

How to create a pure text button toolbar?
I want to create a toolbar. On which, there is only text (no image) on its button. I call SetButtonInfo() with iImage=-1. It take effect, but there are still a blank block on the button. Thank you very much. You have to destroy the imagelist(s) corresponding to the toolbar. There was excellent sample by Paul Dilascia in MSJ/MSDN few years back where he showed how to replace a menu by a toolbar in an MDI application. A search on MSDN's site for that sample would be helpful. In addition, look at codeguru/codeproject for some sample on this. I am sure something must be there as well. ----...

How do I insert numbers after text?
I would like to type in my text in a document and then insert a number, but I want the number to change automatically for the next text. For example, I want to say, "Requested Charge No. 1", but I want to insert the number 1, so when I enter my next charge I can insert the number 2. -- Sherry Vinturella You can use SEQ fields. For example, { SEQ myseq } would produce a list of Arabic numbers. To insert the field, you can press Ctrl+F9; Word adds field delimiters, { }, and then type the code as shown. To create additional fields, you can use copy and paste. Note t...

Where to find thorough introduction to Excel objects
Hi folks, I thumbed through several books on Excel VBA programming, but no one was a satisfying primer or description of all the Excel classes or objects giving thorough information on their usage and associated methods. Most VBA Excel books shows pre-selections of classes and methods. Does anybody can recommend an thorough internet site, tutorial, or book for learning? Thanks Michael On Sun, 15 Feb 2009 08:39:57 -0800 (PST), "Michael.Tarnowski" <emte69@gmx.de> wrote: >Hi folks, >I thumbed through several books on Excel VBA programming, but no one >was a satisfyin...

Force a new line in a cell with "wrap text" on
How can I put a newline command in a cell formula? I've tried using Alt-Enter, but it doesn't work. Why would you want to wrap a formula? Do you mean text, or an actual formula? "DRARetired" <draretired@sbcglobal.net> wrote in message news:edf201c43d16$e7f8e5c0$a001280a@phx.gbl... > How can I put a newline command in a cell formula? I've > tried using Alt-Enter, but it doesn't work. In a Worksheet use CHAR(10) in a macro use CHR(10) Alt+Enter automatically turns on Cell Wrap. This won't so you may have to format the cells yourself. Fo...

Merge Text From Two Cells
I would like to merge texts from two different cells into the third cell. Example:- Cell A1 - Tom Cell A2 - Jones Cell A3 - Tom Jones I am using this formula in cell A3 :- =A1&""&B1 But I get TomJones (combined into one word) instead of Tom Jones (two words). Can someone help me to modify the code/formula so that I get Tom Jones (two words) Warmest regards, Salza Hi Salza! Use: =A1&" "&B1 Note the space between the double quotation marks -- Regards Norman Harker MVP (Excel) Sydney, Australia njharker@optusnet.com.au Excel and Word Functio...

Using find and replace in different fields
Hello everyone. I am trying to use access to see a word in one field and write a number in another field. Like if agree =3 , disagree= 1. I want access to see agree in a field and write 3 in another field. How can this be done? In news:17904967-C3A7-42E4-8AEE-583B62E38DD6@microsoft.com, lostinseganet <lostinseganet@discussions.microsoft.com> wrote: > Hello everyone. I am trying to use access to see a word in one field > and write a number in another field. Like if agree =3 , disagree= 1. > I want access to see agree in a field and write 3 in another field. > How can this ...