![]() |
|
|
|
#1
|
|||
|
|||
|
Davd,
I just don't see a simple solution. This may work, but in complex documents with things other than text, it might fall over: Code:
Sub ScratchMacro()
'A basic Word macro coded by Greg Maxey
Dim oRng As Word.Range
Dim lngS As Long, lngE As Long
Set oRng = Selection.Range
lngS = Len(ActiveDocument.Range.Text)
oRng.PasteSpecial DataType:=wdPasteText
lngE = Len(ActiveDocument.Range.Text)
oRng.MoveStart wdCharacter, -(lngE - lngS)
oRng.Select
lbl_Exit:
Exit Sub
End Sub
|
|
| Tags |
| copy and paste, text selection |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Macro to find text in between two characters and then format selected text? | qcom | Word | 5 | 02-19-2015 11:23 PM |
Getting mult resps. selected in listbox to concatenate & paste at a bookmark in Word
|
marksm33 | Word VBA | 3 | 01-15-2015 05:59 PM |
Formatting affecting more than selected text
|
esteban | Word | 7 | 05-25-2012 04:34 AM |
Do NOT print selected text
|
Tracy | Word | 2 | 09-11-2011 07:25 AM |
| Selected text and logo in one macro | marijke | Word VBA | 0 | 08-24-2009 07:01 AM |