![]() |
#16
|
|||
|
|||
![]()
Hi, I managed to get this working. I found that extending the selection allowed capturing of the sentence, but was stopping my find working.
I used the below code to save the selection, expand the selection and copy the sentence, then reinstate the selection. Code:
Dim selCurrent As Object Set selCurrent = m_oWordApp.Selection.Range m_oWordApp.Selection.Expand Unit:=3 ' sentence sSentenceToSearch = m_oWordApp.Selection selCurrent.Select |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
littlepeaks | Word VBA | 10 | 08-09-2022 12:12 PM |
![]() |
Swarup | Word | 11 | 07-26-2022 01:51 PM |
![]() |
mrplastic | Word VBA | 4 | 12-20-2019 01:25 PM |
Word for Mac 2011: Problems accessing Text Boxes programmatically | techy291 | Word VBA | 0 | 07-16-2017 08:41 AM |
![]() |
RBusiness | Word | 1 | 06-07-2011 04:26 PM |