copying excel info into word

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How can i copy a column of excel information into a Word document, and have
the style change it into a paragraph format? For instance if i have a column
of drawing numbers, i'd like to insert them into a word document but in a
pargraph form, hopefully separated by commas? Possible? Or am I expecting
too much?
 
Eric

You could place the column of numbers into one comma-delimited cell in Excel
then copy that one cell into Word.

Sub ConCat_Cells()
Dim x As Range
Dim y As Range
Dim z As Range
Dim w As String
Dim sbuf As String
On Error GoTo endit
w = InputBox("Enter the Type of De-limiter Desired")
Set z = Application.InputBox("Select Destination Cell", _
"Destination Cell", , , , , , 8)
Application.SendKeys "+{F8}"
Set x = Application.InputBox("Select Cells...Contiguous or Non-Contiguous", _
"Cells Selection", , , , , , 8)
For Each y In x
If Len(y.text) > 0 Then sbuf = sbuf & y.text & w
Next
z = Left(sbuf, Len(sbuf) - 1)
Exit Sub
endit:
MsgBox "Nothing Selected. Please try again."
End Sub


Gord Dibben MS Excel MVP
 

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

Back
Top