[RESOLVED] Copy text between documents
Hello guys,
I am trying to figure out how to copy the text that my macroscript marks green,
into a another open active document,
between 2 linebreaks,
Can someone help me out?
See code snipet below,
Sub Test()
Dim oRng As Word.Range
Set oRng = ActiveDocument.Range
With oRng.Find
.Text = "Claims"
While .Execute
oRng.MoveEndUntil Chr(11)
oRng.MoveEnd wdCharacter, 1
oRng.MoveEndUntil Chr(11)
oRng.HighlightColorIndex = wdBrightGreen
oRng.Collapse wdCollapseEnd
Wend
End With
End Sub
Thank you in advance
Cheers
Elmnas
Re: Copy text between documents
orng.copy before collapsing, then find the position in the other document and paste
Re: Copy text between documents
thank you mate I solved it by another way.