Numbered paragraph. Selecting Text and Numbers

  • Thread starter msnews.microsoft.com
  • Start date
M

msnews.microsoft.com

I have some numered paragraphs and i need to copy not just the paragraph
text but also the numbers in one go, to paste them in another document. BTW,
I don´t mind if i loose the format, plain text is OK for my needs.

Thanks
 
G

Greg Maxey

AFAIK you can only do this using a macro to construct the proper text string
and put it in the clipboard. Once in teh clipboard you can paste with the
mouse or menu keys:

Sub MyCopyToClipBoard()
Dim myCopy As DataObject
'Must have a reference to Microsoft Forms 2.0 Object Library enabled
'to use DataObject. Tools>References. If not listed, try adding a UserForm
to
'your template project.
Dim myRng As Range
Set myCopy = New DataObject
Set myRng = Selection.Paragraphs(1).Range
myCopy.SetText myRng.ListFormat.ListString & " " & myRng
myCopy.PutInClipboard
End Sub
 
S

Stefan Blom

FWIW, to copy and then Paste Special (as "Unformatted text") seems to
bring the paragraph number along, too. Any left indent from the list
template is not included, though.

--
Stefan Blom
Microsoft Word MVP


in message
 
S

Stefan Blom

Any left indent from the list
template is not included, though.

This obvious, of course. By definition, pasting as unformatted text
means to exclude formatting.

--
Stefan Blom
Microsoft Word MVP


in message
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top