Frosting? That was part of your original question, and I totally missed that the change I put in reverted back to the table pasting. My apologies!Originally Posted by Nee
Give this one a shot:
[vba]Sub Screenshot2()
'transfers XL range with format to Word doc
'makes changes to "c:\Test.doc" Change directory to suit
Dim Wdapp As Object, wdDoc As Object
With Sheets("sheet1").Range("A1:A100") 'change range to suit
With .Borders(xlInsideHorizontal)
.Weight = xlThin
.ColorIndex = 2
End With
With .Borders(xlEdgeTop)
.Weight = xlThin
.ColorIndex = 2
End With
With .Borders(xlEdgeLeft)
.Weight = xlThin
.ColorIndex = 2
End With
With .Borders(xlEdgeRight)
.Weight = xlThin
.ColorIndex = 2
End With
With .Borders(xlEdgeBottom)
.Weight = xlThin
.ColorIndex = 2
End With
.Copy
End With
On Error GoTo Errmsg
Set Wdapp = CreateObject("Word.Application")
Set wdDoc = Wdapp.documents.Add
With wdDoc
.Range(0).PasteSpecial DataType:=1
With .Parent
.Selection.Tables(1).Select
.Selection.Rows.ConvertToText Separator:=0, NestedTables:=True
.Selection.ParagraphFormat.Alignment = 0
End With
End With
Application.CutCopyMode = False
Wdapp.Visible = True
Set Wdapp = Nothing
Exit Sub
Errmsg: MsgBox "You have an error"
Wdapp.Quit
Set Wdapp = Nothing
End Sub[/vba]
Could probably be a little cleaner in the word side, but should do the trick.