Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 04-16-2019, 09:54 PM
subrota subrota is offline Synonym list Windows 10 Synonym list Office 2013
Novice
Synonym list
 
Join Date: Apr 2019
Posts: 11
subrota is on a distinguished road
Default Synonym list

I want all synonyms with a list inside a text box in a user form for a word from a paragraph. But it shows one by one with the msgbox.





Code:
Private Sub CommandButton1_Click()

Dim mySynObj As Object
Dim SList As Variant
Dim i As Variant

Selection.MoveLeft Unit:=wdWord, Count:=1
Selection.MoveRight Unit:=wdWord, Count:=1, Extend:=wdExtend




Set mySynObj = Selection.Range.SynonymInfo
SList = mySynObj.SynonymList(1)
For i = 1 To UBound(SList)
  MsgBox "A synonym for " & mySynObj.Word _
   & " is " & SList(i)
Next i
End Sub
Attached Files
File Type: docm Synonym List.docm (16.6 KB, 9 views)

Last edited by macropod; 04-16-2019 at 10:45 PM. Reason: Added code tags & formatting
Reply With Quote
 

Tags
synonym list



Similar Threads
Thread Thread Starter Forum Replies Last Post
Synonym list How to import list from Excel into drop-down list into word ahw Word VBA 43 02-28-2020 08:11 PM
Task list checkboxes appear solid black when I print list mechitar Outlook 0 10-24-2018 09:06 AM
Attempting to mail merge one list into a document containing 3 pages - each page needs the same list LisaRH Mail Merge 3 08-09-2018 03:01 PM
Word 2013 question - master list current list markecb Word 6 02-28-2016 01:51 AM
Synonym list List Style Numbering picks up out of order number from LATER list spthomas Word 12 12-16-2013 05:23 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:40 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft