Results 1 to 2 of 2
  1. #1
    2 Star Lounger
    Join Date
    Jan 2004
    Location
    Mount Prospect, Illinois
    Posts
    142
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Powerpoint Thesaurus (2000+)

    Has anyone put together a macro allowing Powerpoint to access the Word thesaurus? It seems neglient on MS' part not to have put it in PowerPoint (at least 2000 and XP, I don't know about 2003), when synonyms are even more critical in headlines than in narrative text to avoid repetitive text.

    I know I could put something together that would open Word, create an invisible doc, then bring up the thesaurus dialog, I'm just hoping somebody has done it already, and save me a couple of hours of testing.

    Thanks,
    Joel

  2. #2
    Silver Lounger
    Join Date
    Mar 2001
    Location
    Springfield, Ohio, USA
    Posts
    2,136
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Powerpoint Thesaurus (2000+)

    Couldn't find any posts with it done, so I did it myself. Probably would be better to buy 2003: it is in there. Notice that I did not check to make sure that there is text selected, PowerPoint's Selection object does not always have a TextRange; you'll need to add some error checking. Also, I limited synonyms to just one word because Word has added a paragraph mark at the end; guess I should have selected all but the last Word character. If you make it better, please post your improvements. HTH --Sam
    <pre>Option Explicit
    Sub Thesaurus()
    Dim wdApp As Object
    Const wdPasteText = 2
    ActiveWindow.Selection.TextRange.Characters.Copy
    Set wdApp = CreateObject("word.application")
    wdApp.Documents.Add.Content.PasteSpecial , , , , wdPasteText
    wdApp.ActiveDocument.Select
    wdApp.Selection.Range.CheckSynonyms
    wdApp.ActiveDocument.Words(1).Copy
    PowerPoint.ActiveWindow.Selection.TextRange.Charac ters.Paste
    wdApp.Quit False
    Set wdApp = Nothing
    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
  •