![]() |
#1
|
|||
|
|||
![]()
Hi,
I have a paragraph and some bold word (targeted word). I need synonym for each targeted word in a new document. Example My Paragraph: It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like). Here my targeted words are: layout, Content, us, many, Various, sometime My expected outcome in a new document: layout plan design arrangement outline draught draft blueprint Content Gratified Happy Satisfied Contented Pleased Comfortable Relaxed At ease ........ ....... Code:
Dim mySynObj As Object Dim Slist As Variant Dim i As Long Dim StrOut As String Documents.Add Windows(2).Activate Selection.WholeStory Selection.Find.Font.Bold = True Do While Selection.Find.Execute Selection.Copy Set mySynObj = Selection.Range.SynonymInfo Slist = mySynObj.SynonymList(1) For i = 1 To UBound(mySynObj.SynonymList(1)) StrOut = StrOut & " " & Slist(i) Next Windows(1).Activate Selection.Paste Selection.TypeText Text:=StrOut Selection.TypeParagraph Windows(2).Activate Loop |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to trigger animations separately ? | mj2000 | PowerPoint | 0 | 02-06-2019 10:10 AM |
![]() |
bluejasmine | Word | 3 | 07-15-2018 07:21 AM |
Check for value in each cell separately | Jelmer | Excel | 4 | 07-06-2017 07:43 AM |
Can we buy Access separately? | eeaakkat | Office | 2 | 04-04-2017 08:28 PM |
![]() |
Vervaine | Word | 1 | 12-18-2016 06:37 PM |