Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy-pasting from Excel to Word
Hi
I'm trying to copy-paste (unformatted), a series of cells from excel into Word. I've got the below macro which does some of this but it keeps pasting the whole table either as a picture or a normal table (if you use the disabled line instead of the enabled paste line). However, if I manually copy-paste special and select unformatted text I get a load of text and no tables or borders which is what I want. Any ideas how to achieve this with the below macro? Sub OpenAWordFile() Dim wordApp As Object Dim fNameAndPath As String ActiveSheet.Range("I5:I51").Copy fNameAndPath = "C:\Documents and Settings\tom.jordan\My Documents\Projects\FFEC Headed Paper.doc" Set wordApp = CreateObject("Word.Application") With wordApp .Documents.Open (fNameAndPath) .Visible = True .Selection.PasteSpecial DataType:=wdPasteText '.Selection.PasteAndFormat (wdPasteDefault) .Selection.WholeStory .Selection.Font.Name = "Arial" .Selection.Font.Size = 11 End With Set wordApp = Nothing Application.CutCopyMode = False End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Copy-pasting (unformatted) to a word document | Excel Programming | |||
Copy-special pasting a table via an excel button into a word doc | Excel Programming | |||
Copy and Special pasting into an existing word template | Excel Programming | |||
Pasting excel into word | Excel Discussion (Misc queries) | |||
Pasting from Word into Excel | Excel Discussion (Misc queries) |