Results 1 to 4 of 4
  1. #1
    Lounger
    Join Date
    May 2002
    Location
    California, USA
    Posts
    26
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi guys, does anyone know if it is possible to automate the thesaurus so it returns synonyms down the rows.

    for example say I had the first row filled with words

    Lazy Brown Fox jumps over

    Is there any way to get it to fill down

    Slothful chocolate hops etc, whatever it finds. Some words would probably not return values

    I have Excel 2007. Thanks

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    I don't have Excel 2007, but Excel 2003 doesn't have support for automating synonyms. You can use Word however. If you create a table with 2 columns, and with words in the first column, the following macro will return the synonyms for the words in the second column.
    You can then copy the table into Excel, of course.

    Code:
    Sub FillSynonyms()
      Dim oCell As Cell
      Dim sInfo As SynonymInfo
      Dim vList As Variant
      Dim i As Integer
      Dim strList As String
      Application.ScreenUpdating = False
      'Select the third cell in the first row of the table
      Selection.Tables(1).Cell(1, 1).Select
      'Select column 1
      Selection.SelectColumn
      'Operate on the cells in column 1
      For Each oCell In Selection.Cells
    	Set sInfo = oCell.Range.SynonymInfo
    	vList = sInfo.SynonymList(1)
    	strList = ""
    	For i = 1 To UBound(vList)
    	  strList = strList & ", " & vList(i)
    	Next i
    	If Not strList = "" Then
    	  strList = Mid(strList, 3)
    	End If
    	oCell.Next.Range.Text = strList
      Next oCell
      Application.GoBack
      Application.ScreenUpdating = True
    End Sub

  3. #3
    3 Star Lounger Jim Cone's Avatar
    Join Date
    Feb 2002
    Location
    Portland, Oregon, USA
    Posts
    238
    Thanks
    0
    Thanked 3 Times in 3 Posts
    In case there is someone reading this who wants a dedicated Excel Thesaurus;
    the free "Thesaurus for Excel" add-in (xl2000 to xl2003) can be downloaded from...
    http://excelusergroup.org/media/
    It has not been tested on xl2007.

    Can print single/multiple_synonym/antonym lists to the worksheet with a click.
    '--
    Jim Cone
    Portland, Oregon USA
    (yes I wrote it)

  4. #4
    Lounger
    Join Date
    May 2002
    Location
    California, USA
    Posts
    26
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks guys, I am going to give these a try.

    Jim, That is Sweet! Thanks

    Is it ok if I share?

Posting Permissions

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